Example #1
0
        /// <summary>
        /// Retrieves the details of a specific channel group
        /// </summary>
        /// <param name="channels"> </param>
        /// <returns>KodiRpc.PVR.GetChannelGroupDetailsResponse</returns>
        public async Task <KodiRpc.PVR.GetChannelGroupDetailsResponse> GetChannelGroupDetails(KodiRpc.PVR.GetChannelGroupDetails_channels channels = null)
        {
            var jArgs = new JObject();

            if (channels != null)
            {
                var jpropchannels = JToken.FromObject(channels, _client.Serializer);
                jArgs.Add(new JProperty("channels", jpropchannels));
            }
            return(await _client.GetData <KodiRpc.PVR.GetChannelGroupDetailsResponse>("PVR.GetChannelGroupDetails", jArgs));
        }
Example #2
0
        /// <summary>
        /// Retrieves the details of a specific channel group
        /// </summary>
        /// <param name="channelgroupid"> REQUIRED </param>
        /// <param name="channels"> </param>
        /// <returns>KodiRpc.PVR.GetChannelGroupDetailsResponse</returns>
        public async Task <KodiRpc.PVR.GetChannelGroupDetailsResponse> GetChannelGroupDetails(KodiRpc.PVR.ChannelGroup.Id1?channelgroupid = null, KodiRpc.PVR.GetChannelGroupDetails_channels channels = null)
        {
            var jArgs = new JObject();

            if (channelgroupid == null)
            {
                throw new global::System.ArgumentException("Parameter cannot be null channelgroupid");
            }
            else
            {
                var jpropchannelgroupid = JToken.FromObject(channelgroupid, _client.Serializer);
                jArgs.Add(new JProperty("channelgroupid", jpropchannelgroupid));
            }
            if (channels != null)
            {
                var jpropchannels = JToken.FromObject(channels, _client.Serializer);
                jArgs.Add(new JProperty("channels", jpropchannels));
            }
            return(await _client.GetData <KodiRpc.PVR.GetChannelGroupDetailsResponse>("PVR.GetChannelGroupDetails", jArgs));
        }