From 80fd8d015626cbb5ed9ea8678149b13a4a1272f4 Mon Sep 17 00:00:00 2001 From: LukePulverenti Luke Pulverenti luke pulverenti Date: Wed, 1 Aug 2012 15:09:24 -0400 Subject: Added ApiPort and ServerHostName to ApiClient --- MediaBrowser.ApiInteraction/BaseClient.cs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'MediaBrowser.ApiInteraction/BaseClient.cs') diff --git a/MediaBrowser.ApiInteraction/BaseClient.cs b/MediaBrowser.ApiInteraction/BaseClient.cs index bd25b1653b..887c1779fe 100644 --- a/MediaBrowser.ApiInteraction/BaseClient.cs +++ b/MediaBrowser.ApiInteraction/BaseClient.cs @@ -8,7 +8,23 @@ namespace MediaBrowser.ApiInteraction /// public abstract class BaseClient : IDisposable { - public string ApiUrl { get; set; } + /// + /// Gets or sets the server host name (myserver or 192.168.x.x) + /// + public string ServerHostName { get; set; } + + /// + /// Gets or sets the port number used by the API + /// + public int ApiPort { get; set; } + + protected string ApiUrl + { + get + { + return string.Format("http://{0}:{1}/mediabrowser/api", ServerHostName, ApiPort); + } + } protected HttpClient HttpClient { get; private set; } -- cgit v1.2.3