Exemple #1
0
        /// <summary>
        /// Retrieves the timers
        /// </summary>
        public async Task <XBMCRPC.PVR.GetTimersResponse> GetTimers(XBMCRPC.PVR.Fields.Timer properties = null, XBMCRPC.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 <XBMCRPC.PVR.GetTimersResponse>("PVR.GetTimers", jArgs));
        }
Exemple #2
0
        /// <summary>
        /// Retrieves the details of a specific timer
        /// </summary>
        public async Task <XBMCRPC.PVR.GetTimerDetailsResponse> GetTimerDetails(int timerid = 0, XBMCRPC.PVR.Fields.Timer properties = null)
        {
            var jArgs = new JObject();

            if (timerid != null)
            {
                var jproptimerid = JToken.FromObject(timerid, _client.Serializer);
                jArgs.Add(new JProperty("timerid", jproptimerid));
            }
            if (properties != null)
            {
                var jpropproperties = JToken.FromObject(properties, _client.Serializer);
                jArgs.Add(new JProperty("properties", jpropproperties));
            }
            return(await _client.GetData <XBMCRPC.PVR.GetTimerDetailsResponse>("PVR.GetTimerDetails", jArgs));
        }