コード例 #1
0
        /// <summary>
        /// Retrieves the channel list
        /// </summary>
        public async Task <XBMCRPC.PVR.GetChannelsResponse> GetChannels(XBMCRPC.PVR.ChannelGroup.Id1 channelgroupid, XBMCRPC.PVR.Fields.Channel properties = null, XBMCRPC.List.Limits limits = null)
        {
            var jArgs = new JObject();

            if (channelgroupid != null)
            {
                var jpropchannelgroupid = JToken.FromObject(channelgroupid, _client.Serializer);
                jArgs.Add(new JProperty("channelgroupid", jpropchannelgroupid));
            }
            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 <XBMCRPC.PVR.GetChannelsResponse>("PVR.GetChannels", jArgs));
        }
コード例 #2
0
        /// <summary>
        /// Retrieves the details of a specific channel group
        /// </summary>
        public async Task <XBMCRPC.PVR.GetChannelGroupDetailsResponse> GetChannelGroupDetails(XBMCRPC.PVR.ChannelGroup.Id1 channelgroupid, XBMCRPC.PVR.GetChannelGroupDetails_channels channels = null)
        {
            var jArgs = new JObject();

            if (channelgroupid != null)
            {
                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 <XBMCRPC.PVR.GetChannelGroupDetailsResponse>("PVR.GetChannelGroupDetails", jArgs));
        }