1#ifndef TENDUKE_SE_LICENSING_ABSTRACTPAGINGAPIREQUEST_H
2#define TENDUKE_SE_LICENSING_ABSTRACTPAGINGAPIREQUEST_H
6#include "./AbstractAPIRequestMixin.h"
29 const ::tenduke::net::URL &
baseUrl
30 ,
const std::shared_ptr<const ::tenduke::http::HTTPClient> &httpClient
32 ,
const std::shared_ptr<const ::tenduke::http::HTTPResponseToException> &
throwException
33 ,
const std::shared_ptr<const ::tenduke::json::JSONParser> &jsonParser
42 , paging(std::move(paging))
54 if (paging.offset >= 0) {
55 request.
header(
"offset", std::to_string(paging.offset));
57 if (paging.limit >= 0) {
58 request.
header(
"limit", std::to_string(paging.limit));
60 request.
header(
"order-by", (paging.orderBy));
61 if (paging.orderAsc) {
62 request.
header(
"orderAsc",
"true");
AbstractPagingAPIRequest(const ::tenduke::net::URL &baseUrl, const std::shared_ptr< const ::tenduke::http::HTTPClient > &httpClient, const std::shared_ptr< const ::tenduke::http::HTTPRequestAuthenticator > &httpRequestAuthenticator, const std::shared_ptr< const ::tenduke::http::HTTPResponseToException > &throwException, const std::shared_ptr< const ::tenduke::json::JSONParser > &jsonParser, ::tenduke::se::Paging paging)
Constructs a new instance.
Definition AbstractPagingAPIRequest.h:28
Builds HTTPRequest.
Definition HTTPRequestBuilder.h:23
HTTPRequestBuilder & header(const std::string &name, const std::string &value, bool skipIfValueEmpty=true)
Adds header to the request.
Definition HTTPRequestBuilder.cpp:129
Paging-ocnfiguration for the REST-API.
Definition Paging.h:13
Abstract base-class with generic implementation for 10Duke Scale API requests.
Definition AbstractAPIRequestMixin.h:23
const std::shared_ptr< const ::tenduke::http::HTTPResponseToException > throwException
Service to throw exceptions based on HTTP status codes.
Definition AbstractAPIRequestMixin.h:114
AbstractAPIRequestMixin(const ::tenduke::net::URL &baseUrl, const std::shared_ptr< const ::tenduke::http::HTTPClient > &httpClient, const std::shared_ptr< const ::tenduke::http::HTTPRequestAuthenticator > &httpRequestAuthenticator, const std::shared_ptr< const ::tenduke::http::HTTPResponseToException > &throwException, const std::shared_ptr< const ::tenduke::json::JSONParser > &jsonParser)
Constructs a new instance.
Definition AbstractAPIRequestMixin.h:33
const std::shared_ptr< const ::tenduke::http::HTTPRequestAuthenticator > httpRequestAuthenticator
For authenticating the request.
Definition AbstractAPIRequestMixin.h:111
const ::tenduke::net::URL baseUrl
Base-URL for the request.
Definition AbstractAPIRequestMixin.h:105
::tenduke::http::HTTPRequestBuilder & setHeaders(::tenduke::http::HTTPRequestBuilder &request) const override
Sets the paging headers to the request.
Definition AbstractPagingAPIRequest.h:51
AbstractPagingAPIRequest(const ::tenduke::net::URL &baseUrl, const std::shared_ptr< const ::tenduke::http::HTTPClient > &httpClient, const std::shared_ptr< const ::tenduke::http::HTTPRequestAuthenticator > &httpRequestAuthenticator, const std::shared_ptr< const ::tenduke::http::HTTPResponseToException > &throwException, const std::shared_ptr< const ::tenduke::json::JSONParser > &jsonParser, ::tenduke::se::Paging paging)
Constructs a new instance.
Definition AbstractPagingAPIRequest.h:28
Low-level services for performing licensing REST-requests.
Definition DefaultDescribeLicenseConsumerClientBindingsRequest.h:9
Licensing operations for 10Duke Scale.
Definition LicenseConsumerClientBindingStatus.h:8
Classes, functions and globals of 10Duke Scale C++ Client.
Definition AbstractClientFactory.h:16
Root for classes, functions and globals of 10Duke C++ Client.
Definition AbstractClientFactory.h:16