Esempio n. 1
0
        public void GetSchedule(string localeInfo, Guid headendId,
                                DateTime startDate, int durationMinutes,
                                int channelSkip, int channelCount)
        {
            EDSScheduleRequestQuery query = new EDSScheduleRequestQuery(
                startDate, durationMinutes, channelSkip, channelCount);
            RestRequestEx request = new RestRequestEx(
                $"epg/{localeInfo}/lineups/{headendId}/programs", Method.GET);

            request.AddHeaders(Headers);
            request.AddQueryParameters(query.GetQuery());

            IRestResponse response = HttpClient.Execute(request);

            Console.WriteLine(response.Content);
        }
        public async Task <HttpResponseMessage> GetScheduleAsync(string localeInfo, Guid headendId,
                                                                 DateTime startDate, int durationMinutes,
                                                                 int channelSkip, int channelCount)
        {
            EDSScheduleRequestQuery query = new EDSScheduleRequestQuery(
                startDate, durationMinutes, channelSkip, channelCount);
            var request = new HttpRequestMessage(HttpMethod.Get,
                                                 $"epg/{localeInfo}/lineups/{headendId}/programs");

            request.Headers.Add(Headers);
            request.AddQueryParameter(query.GetQuery());

            var response = await HttpClient.SendAsync(request);

            return(response);
        }