diff options
Diffstat (limited to 'MediaBrowser.ApiInteraction/ApiClient.cs')
| -rw-r--r-- | MediaBrowser.ApiInteraction/ApiClient.cs | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/MediaBrowser.ApiInteraction/ApiClient.cs b/MediaBrowser.ApiInteraction/ApiClient.cs index f2fd90309..a621963ec 100644 --- a/MediaBrowser.ApiInteraction/ApiClient.cs +++ b/MediaBrowser.ApiInteraction/ApiClient.cs @@ -336,11 +336,24 @@ namespace MediaBrowser.ApiInteraction }
/// <summary>
- /// Gets weather information for the default location as set in configuration
+ /// Gets the default user
/// </summary>
public async Task<DTOUser> GetDefaultUserAsync()
{
- string url = ApiUrl + "/defaultuser";
+ string url = ApiUrl + "/user";
+
+ using (Stream stream = await GetSerializedStreamAsync(url).ConfigureAwait(false))
+ {
+ return DeserializeFromStream<DTOUser>(stream);
+ }
+ }
+
+ /// <summary>
+ /// Gets a user by id
+ /// </summary>
+ public async Task<DTOUser> GetUserAsync(Guid id)
+ {
+ string url = ApiUrl + "/user?id=" + id.ToString();
using (Stream stream = await GetSerializedStreamAsync(url).ConfigureAwait(false))
{
|
