1#ifndef TENDUKE_SE_LICENSING_ABSTRACTPAGINGAPIREQUEST_H
2#define TENDUKE_SE_LICENSING_ABSTRACTPAGINGAPIREQUEST_H
6#include "./AbstractAPIRequestMixin.h"
9namespace tenduke {
namespace se {
namespace licensing {
namespace rest {
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))
57 if (paging.
limit >= 0) {
58 request.
header(
"limit", std::to_string(paging.
limit));
62 request.
header(
"orderAsc",
"true");
Builds HTTPRequest.
Definition HTTPRequestBuilder.h:22
HTTPRequestBuilder & header(const std::string &name, const std::string &value, bool skipIfValueEmpty=true)
Adds header to the request.
Definition HTTPRequestBuilder.cpp:118
Paging-ocnfiguration for the REST-API.
Definition Paging.h:13
const std::int32_t limit
Number of items to retrieve.
Definition Paging.h:37
const bool orderAsc
Sort in ascending order?
Definition Paging.h:41
const std::int32_t offset
Start offset.
Definition Paging.h:35
const std::string orderBy
Field to sort by.
Definition Paging.h:39
A tenduke::se::APIRequest, which uses tenduke::oidc::OIDCSession to maintain request authorization.
Definition StatefulAPIRequest.h:27
Abstract base-class with generic implementation for 10Duke Scale API requests.
Definition AbstractAPIRequestMixin.h:26
const std::shared_ptr< const ::tenduke::http::HTTPResponseToException > throwException
Service to throw exceptions based on HTTP status codes.
Definition AbstractAPIRequestMixin.h:117
const std::string baseUrl
Base-URL for the request.
Definition AbstractAPIRequestMixin.h:108
const std::shared_ptr< const ::tenduke::http::HTTPRequestAuthenticator > httpRequestAuthenticator
For authenticating the request.
Definition AbstractAPIRequestMixin.h:114
Abstract base class for API-requests, which support paging.
Definition AbstractPagingAPIRequest.h:17
::tenduke::http::HTTPRequestBuilder & setHeaders(::tenduke::http::HTTPRequestBuilder &request) const override
Sets the paging headers to the request.
Definition AbstractPagingAPIRequest.h:51
AbstractPagingAPIRequest(const std::string &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 new instance.
Definition AbstractPagingAPIRequest.h:28
Root for classes, functions and globals of 10Duke C++ Client.
Definition BackendConfiguration.h:7