aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/SessionsService.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2014-03-13 05:02:58 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2014-03-13 05:02:58 -0400
commit219e0ef19baf8c97a13e150fb017e009c37a3597 (patch)
tree1b2ee3591d7998e756be366fa43f5c11375de613 /MediaBrowser.Api/SessionsService.cs
parentf3454d3bf8824582079a9718138300ca7d60edf4 (diff)
parentb2df3d648d64982528907bbd716b2c1984fb1345 (diff)
Merge branch 'master' of https://github.com/MediaBrowser/MediaBrowser
Diffstat (limited to 'MediaBrowser.Api/SessionsService.cs')
-rw-r--r--MediaBrowser.Api/SessionsService.cs47
1 files changed, 45 insertions, 2 deletions
diff --git a/MediaBrowser.Api/SessionsService.cs b/MediaBrowser.Api/SessionsService.cs
index f662e3817..562e45525 100644
--- a/MediaBrowser.Api/SessionsService.cs
+++ b/MediaBrowser.Api/SessionsService.cs
@@ -47,6 +47,14 @@ namespace MediaBrowser.Api
public Guid Id { get; set; }
/// <summary>
+ /// Gets or sets the UserId.
+ /// </summary>
+ /// <value>The id.</value>
+ [ApiMember(Name = "UserId", Description = "The controlling User Id", IsRequired = false, DataType = "string", ParameterType = "path", Verb = "POST")]
+ public Guid UserId { get; set; }
+ //TODO IsRequired = false shall be changed to true once the clients has been updated and the new ApiClient is in use
+
+ /// <summary>
/// Artist, Genre, Studio, Person, or any kind of BaseItem
/// </summary>
/// <value>The type of the item.</value>
@@ -89,6 +97,14 @@ namespace MediaBrowser.Api
public Guid Id { get; set; }
/// <summary>
+ /// Gets or sets the UserId.
+ /// </summary>
+ /// <value>The id.</value>
+ [ApiMember(Name = "UserId", Description = "The controlling User Id", IsRequired = false, DataType = "string", ParameterType = "path", Verb = "POST")]
+ public Guid UserId { get; set; }
+ //TODO IsRequired = false shall be changed to true once the clients has been updated and the new ApiClient is in use
+
+ /// <summary>
/// Artist, Genre, Studio, Person, or any kind of BaseItem
/// </summary>
/// <value>The type of the item.</value>
@@ -122,6 +138,14 @@ namespace MediaBrowser.Api
public Guid Id { get; set; }
/// <summary>
+ /// Gets or sets the UserId.
+ /// </summary>
+ /// <value>The id.</value>
+ [ApiMember(Name = "UserId", Description = "The controlling User Id", IsRequired = false, DataType = "string", ParameterType = "path", Verb = "POST")]
+ public Guid UserId { get; set; }
+ //TODO IsRequired = false shall be changed to true once the clients has been updated and the new ApiClient is in use
+
+ /// <summary>
/// Gets or sets the position to seek to
/// </summary>
[ApiMember(Name = "SeekPositionTicks", Description = "The position to seek to.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "POST")]
@@ -147,6 +171,14 @@ namespace MediaBrowser.Api
public Guid Id { get; set; }
/// <summary>
+ /// Gets or sets the UserId.
+ /// </summary>
+ /// <value>The id.</value>
+ [ApiMember(Name = "UserId", Description = "The controlling User Id", IsRequired = false, DataType = "string", ParameterType = "path", Verb = "POST")]
+ public Guid UserId { get; set; }
+ //TODO IsRequired = false shall be changed to true once the clients has been updated and the new ApiClient is in use
+
+ /// <summary>
/// Gets or sets the command.
/// </summary>
/// <value>The play command.</value>
@@ -165,6 +197,14 @@ namespace MediaBrowser.Api
[ApiMember(Name = "Id", Description = "Session Id", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "POST")]
public Guid Id { get; set; }
+ /// <summary>
+ /// Gets or sets the UserId.
+ /// </summary>
+ /// <value>The id.</value>
+ [ApiMember(Name = "UserId", Description = "The controlling User Id", IsRequired = false, DataType = "string", ParameterType = "path", Verb = "POST")]
+ public Guid UserId { get; set; }
+ //TODO IsRequired = false shall be changed to true once the clients has been updated and the new ApiClient is in use
+
[ApiMember(Name = "Text", Description = "The message text.", IsRequired = true, DataType = "string", ParameterType = "query", Verb = "POST")]
public string Text { get; set; }
@@ -270,9 +310,10 @@ namespace MediaBrowser.Api
}
public void Post(SendPlaystateCommand request)
- {
+ {
var command = new PlaystateRequest
{
+ UserId = request.UserId,
Command = request.Command,
SeekPositionTicks = request.SeekPositionTicks
};
@@ -290,6 +331,7 @@ namespace MediaBrowser.Api
{
var command = new BrowseRequest
{
+ UserId = request.UserId,
Context = request.Context,
ItemId = request.ItemId,
ItemName = request.ItemName,
@@ -321,6 +363,7 @@ namespace MediaBrowser.Api
var command = new MessageCommand
{
Header = string.IsNullOrEmpty(request.Header) ? "Message from Server" : request.Header,
+ UserId = request.UserId,
TimeoutMs = request.TimeoutMs,
Text = request.Text
};
@@ -339,7 +382,7 @@ namespace MediaBrowser.Api
var command = new PlayRequest
{
ItemIds = request.ItemIds.Split(',').ToArray(),
-
+ UserId = request.UserId,
PlayCommand = request.PlayCommand,
StartPositionTicks = request.StartPositionTicks
};