Exemplo n.º 1
0
 public BundleEndpoint(IHttpSerializerClient client)
     : base(client)
 {
 }
Exemplo n.º 2
0
 public SubscriptionEndpoint(IHttpSerializerClient client)
     : base(client)
 {
 }
Exemplo n.º 3
0
        public static async Task <List <TObject> > GetAllAsync <TObject, TCollection>(IHttpSerializerClient client, string relativeUrl, Func <TCollection, TObject> selector)
        {
            var items     = new List <TObject>();
            var delimiter = relativeUrl.Contains("?") ? "&" : "?";
            var page      = 1;

            while (true)
            {
                var query    = $"{delimiter}per_page={ItemsPerPage}&page={page}";
                var response = await client.GetAsync <IEnumerable <TCollection> >(relativeUrl + query).ConfigureAwait(false);

                if (!response.Any())
                {
                    break;
                }
                items.AddRange(response.Select(selector));
                page++;
            }
            return(items);
        }
Exemplo n.º 4
0
 public DiscountEndpoint(IHttpSerializerClient client)
     : base(client)
 {
 }
Exemplo n.º 5
0
 internal SendOwlAPIClient(IHttpSerializerClient client)
 {
     this.client = client;
 }
Exemplo n.º 6
0
 public HTTPEndpoint(IHttpSerializerClient httpClient)
 {
     this.httpClient = httpClient;
 }
Exemplo n.º 7
0
 public ProductEndpoint(IHttpSerializerClient client)
     : base(client)
 {
 }