update to latest js api client
This commit is contained in:
parent
a4756fffe1
commit
62521eabc2
|
@ -1,7 +1,7 @@
|
||||||
using System;
|
using MediaBrowser.Model.Net;
|
||||||
|
using System;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using MediaBrowser.Model.Net;
|
|
||||||
|
|
||||||
namespace MediaBrowser.Common.Net
|
namespace MediaBrowser.Common.Net
|
||||||
{
|
{
|
||||||
|
@ -54,24 +54,6 @@ namespace MediaBrowser.Common.Net
|
||||||
Task SendAsync(byte[] buffer, WebSocketMessageType type, CancellationToken cancellationToken);
|
Task SendAsync(byte[] buffer, WebSocketMessageType type, CancellationToken cancellationToken);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Class WebSocketMessage
|
|
||||||
/// </summary>
|
|
||||||
/// <typeparam name="T"></typeparam>
|
|
||||||
public class WebSocketMessage<T>
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the type of the message.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The type of the message.</value>
|
|
||||||
public string MessageType { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the data.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The data.</value>
|
|
||||||
public T Data { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Class WebSocketMessageInfo
|
/// Class WebSocketMessageInfo
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -46,6 +46,7 @@
|
||||||
<Compile Include="Dto\ChapterInfoDto.cs" />
|
<Compile Include="Dto\ChapterInfoDto.cs" />
|
||||||
<Compile Include="Dto\IItemDto.cs" />
|
<Compile Include="Dto\IItemDto.cs" />
|
||||||
<Compile Include="Entities\IByReferenceItem.cs" />
|
<Compile Include="Entities\IByReferenceItem.cs" />
|
||||||
|
<Compile Include="Net\WebSocketMessage.cs" />
|
||||||
<Compile Include="Net\WebSocketMessageType.cs" />
|
<Compile Include="Net\WebSocketMessageType.cs" />
|
||||||
<Compile Include="Net\WebSocketState.cs" />
|
<Compile Include="Net\WebSocketState.cs" />
|
||||||
<Compile Include="Querying\ItemsByNameQuery.cs" />
|
<Compile Include="Querying\ItemsByNameQuery.cs" />
|
||||||
|
|
22
MediaBrowser.Model/Net/WebSocketMessage.cs
Normal file
22
MediaBrowser.Model/Net/WebSocketMessage.cs
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
|
||||||
|
namespace MediaBrowser.Model.Net
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Class WebSocketMessage
|
||||||
|
/// </summary>
|
||||||
|
/// <typeparam name="T"></typeparam>
|
||||||
|
public class WebSocketMessage<T>
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the type of the message.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The type of the message.</value>
|
||||||
|
public string MessageType { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the data.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The data.</value>
|
||||||
|
public T Data { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -1516,6 +1516,48 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets local trailers for an item
|
||||||
|
*/
|
||||||
|
self.getLocalTrailers = function (userId, itemId) {
|
||||||
|
|
||||||
|
if (!userId) {
|
||||||
|
throw new Error("null userId");
|
||||||
|
}
|
||||||
|
if (!itemId) {
|
||||||
|
throw new Error("null itemId");
|
||||||
|
}
|
||||||
|
|
||||||
|
var url = self.getUrl("Users/" + userId + "/Items/" + itemId + "/LocalTrailers");
|
||||||
|
|
||||||
|
return self.ajax({
|
||||||
|
type: "GET",
|
||||||
|
url: url,
|
||||||
|
dataType: "json"
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets special features for an item
|
||||||
|
*/
|
||||||
|
self.getSpecialFeatures = function (userId, itemId) {
|
||||||
|
|
||||||
|
if (!userId) {
|
||||||
|
throw new Error("null userId");
|
||||||
|
}
|
||||||
|
if (!itemId) {
|
||||||
|
throw new Error("null itemId");
|
||||||
|
}
|
||||||
|
|
||||||
|
var url = self.getUrl("Users/" + userId + "/Items/" + itemId + "/SpecialFeatures");
|
||||||
|
|
||||||
|
return self.ajax({
|
||||||
|
type: "GET",
|
||||||
|
url: url,
|
||||||
|
dataType: "json"
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Marks an item as played or unplayed
|
* Marks an item as played or unplayed
|
||||||
* This should not be used to update playstate following playback.
|
* This should not be used to update playstate following playback.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="MediaBrowser.ApiClient.Javascript" version="3.0.67" targetFramework="net45" />
|
<package id="MediaBrowser.ApiClient.Javascript" version="3.0.68" targetFramework="net45" />
|
||||||
<package id="ServiceStack.Common" version="3.9.42" targetFramework="net45" />
|
<package id="ServiceStack.Common" version="3.9.42" targetFramework="net45" />
|
||||||
<package id="ServiceStack.Text" version="3.9.42" targetFramework="net45" />
|
<package id="ServiceStack.Text" version="3.9.42" targetFramework="net45" />
|
||||||
</packages>
|
</packages>
|
|
@ -2,7 +2,7 @@
|
||||||
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
|
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
|
||||||
<metadata>
|
<metadata>
|
||||||
<id>MediaBrowser.Common.Internal</id>
|
<id>MediaBrowser.Common.Internal</id>
|
||||||
<version>3.0.58</version>
|
<version>3.0.61</version>
|
||||||
<title>MediaBrowser.Common.Internal</title>
|
<title>MediaBrowser.Common.Internal</title>
|
||||||
<authors>Luke</authors>
|
<authors>Luke</authors>
|
||||||
<owners>ebr,Luke,scottisafool</owners>
|
<owners>ebr,Luke,scottisafool</owners>
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
<description>Contains common components shared by Media Browser Theatre and Media Browser Server. Not intended for plugin developer consumption.</description>
|
<description>Contains common components shared by Media Browser Theatre and Media Browser Server. Not intended for plugin developer consumption.</description>
|
||||||
<copyright>Copyright © Media Browser 2013</copyright>
|
<copyright>Copyright © Media Browser 2013</copyright>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency id="MediaBrowser.Common" version="3.0.58" />
|
<dependency id="MediaBrowser.Common" version="3.0.61" />
|
||||||
<dependency id="NLog" version="2.0.0.2000" />
|
<dependency id="NLog" version="2.0.0.2000" />
|
||||||
<dependency id="ServiceStack.Text" version="3.9.38" />
|
<dependency id="ServiceStack.Text" version="3.9.38" />
|
||||||
<dependency id="protobuf-net" version="2.0.0.621" />
|
<dependency id="protobuf-net" version="2.0.0.621" />
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
||||||
<metadata>
|
<metadata>
|
||||||
<id>MediaBrowser.Common</id>
|
<id>MediaBrowser.Common</id>
|
||||||
<version>3.0.58</version>
|
<version>3.0.61</version>
|
||||||
<title>MediaBrowser.Common</title>
|
<title>MediaBrowser.Common</title>
|
||||||
<authors>Media Browser Team</authors>
|
<authors>Media Browser Team</authors>
|
||||||
<owners>ebr,Luke,scottisafool</owners>
|
<owners>ebr,Luke,scottisafool</owners>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
||||||
<metadata>
|
<metadata>
|
||||||
<id>MediaBrowser.Server.Core</id>
|
<id>MediaBrowser.Server.Core</id>
|
||||||
<version>3.0.58</version>
|
<version>3.0.61</version>
|
||||||
<title>Media Browser.Server.Core</title>
|
<title>Media Browser.Server.Core</title>
|
||||||
<authors>Media Browser Team</authors>
|
<authors>Media Browser Team</authors>
|
||||||
<owners>ebr,Luke,scottisafool</owners>
|
<owners>ebr,Luke,scottisafool</owners>
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
<description>Contains core components required to build plugins for Media Browser Server.</description>
|
<description>Contains core components required to build plugins for Media Browser Server.</description>
|
||||||
<copyright>Copyright © Media Browser 2013</copyright>
|
<copyright>Copyright © Media Browser 2013</copyright>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency id="MediaBrowser.Common" version="3.0.58" />
|
<dependency id="MediaBrowser.Common" version="3.0.61" />
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</metadata>
|
</metadata>
|
||||||
<files>
|
<files>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user