/// <summary> /// Retrieve the current profile /// </summary> /// <param name="properties"> </param> /// <returns>KodiRpc.Profiles.Details.Profile</returns> public async Task <KodiRpc.Profiles.Details.Profile> GetCurrentProfile(KodiRpc.Profiles.Fields.Profile properties = null) { var jArgs = new JObject(); if (properties != null) { var jpropproperties = JToken.FromObject(properties, _client.Serializer); jArgs.Add(new JProperty("properties", jpropproperties)); } return(await _client.GetData <KodiRpc.Profiles.Details.Profile>("Profiles.GetCurrentProfile", jArgs)); }
/// <summary> /// Retrieve all profiles /// </summary> /// <param name="properties"> </param> /// <param name="limits"> </param> /// <param name="sort"> </param> /// <returns>KodiRpc.Profiles.GetProfilesResponse</returns> public async Task <KodiRpc.Profiles.GetProfilesResponse> GetProfiles(KodiRpc.Profiles.Fields.Profile properties = null, KodiRpc.List.Limits limits = null, KodiRpc.List.Sort sort = null) { var jArgs = new JObject(); if (properties != null) { var jpropproperties = JToken.FromObject(properties, _client.Serializer); jArgs.Add(new JProperty("properties", jpropproperties)); } if (limits != null) { var jproplimits = JToken.FromObject(limits, _client.Serializer); jArgs.Add(new JProperty("limits", jproplimits)); } if (sort != null) { var jpropsort = JToken.FromObject(sort, _client.Serializer); jArgs.Add(new JProperty("sort", jpropsort)); } return(await _client.GetData <KodiRpc.Profiles.GetProfilesResponse>("Profiles.GetProfiles", jArgs)); }