Пример #1
0
        private async Task <RoutesDto> GetRoutesDto(DateTimeOffset?timestamp, IList <int> includeOnly)
        {
            string requestPath = @"/Routes";

            requestPath += UriQueryBuilder.GetAdditionalParametersQuery(timestamp, includeOnly);

            string json = await contentApiClient.GetResponseFromUrlAsString(requestPath);

            return(JsonConvert.DeserializeObject <RoutesDto>(json));
        }
Пример #2
0
        private async Task <PagesDto> GetPagesDto(DateTimeOffset?timestamp, IList <int> includeOnly)
        {
            string requestPath = @"/Exhibits/Pages";

            requestPath += UriQueryBuilder.GetAdditionalParametersQuery(timestamp, includeOnly);

            string json = await contentApiClient.GetResponseFromUrlAsString(requestPath);

            if (json != null)
            {
                return(JsonConvert.DeserializeObject <PagesDto>(json));
            }

            return(new PagesDto {
                Items = new List <PageDto>(), Total = 0
            });
        }