Added some api client methods, as well as logo and backdrop parents

This commit is contained in:
LukePulverenti Luke Pulverenti luke pulverenti
2012-08-03 11:54:05 -04:00
parent f61227fec0
commit 2cab5712a7
4 changed files with 113 additions and 15 deletions

View File

@@ -1,4 +1,5 @@
using System;
using System.Net;
using System.Net.Http;
namespace MediaBrowser.ApiInteraction
@@ -16,13 +17,16 @@ namespace MediaBrowser.ApiInteraction
/// <summary>
/// Gets or sets the port number used by the API
/// </summary>
public int ApiPort { get; set; }
public int ServerApiPort { get; set; }
/// <summary>
/// Gets the current api url based on hostname and port.
/// </summary>
protected string ApiUrl
{
get
{
return string.Format("http://{0}:{1}/mediabrowser/api", ServerHostName, ApiPort);
return string.Format("http://{0}:{1}/mediabrowser/api", ServerHostName, ServerApiPort);
}
}
@@ -35,7 +39,7 @@ namespace MediaBrowser.ApiInteraction
public BaseClient(HttpClientHandler clientHandler)
{
clientHandler.AutomaticDecompression = System.Net.DecompressionMethods.GZip;
clientHandler.AutomaticDecompression = DecompressionMethods.GZip;
HttpClient = new HttpClient(clientHandler);
}