/// <summary> /// Retrieves the channel list /// </summary> /// <param name="properties"> </param> /// <param name="limits"> </param> /// <returns>KODIRPC.PVR.GetChannelsResponse</returns> public async Task <KODIRPC.PVR.GetChannelsResponse> GetChannels(KODIRPC.PVR.Fields.Channel properties = null, KODIRPC.List.Limits limits = 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)); } return(await _client.GetData <KODIRPC.PVR.GetChannelsResponse>("PVR.GetChannels", jArgs)); }
/// <summary> /// Retrieves the details of a specific channel /// </summary> /// <param name="channelid"> REQUIRED </param> /// <param name="properties"> </param> /// <returns>KODIRPC.PVR.GetChannelDetailsResponse</returns> public async Task <KODIRPC.PVR.GetChannelDetailsResponse> GetChannelDetails(int?channelid = null, KODIRPC.PVR.Fields.Channel properties = null) { var jArgs = new JObject(); if (channelid == null) { throw new global::System.ArgumentException("Parameter cannot be null channelid"); } else { var jpropchannelid = JToken.FromObject(channelid, _client.Serializer); jArgs.Add(new JProperty("channelid", jpropchannelid)); } if (properties != null) { var jpropproperties = JToken.FromObject(properties, _client.Serializer); jArgs.Add(new JProperty("properties", jpropproperties)); } return(await _client.GetData <KODIRPC.PVR.GetChannelDetailsResponse>("PVR.GetChannelDetails", jArgs)); }