mirror of
https://github.com/HenkKalkwater/harbour-sailfin.git
synced 2024-11-24 18:15:16 +00:00
Chris Josten
96ecd8e7d8
ApiClient was refractored to use PIMPL. This is mainly done to reduce compile times whenever the implementation of ApiClient itself changes, since a lot of files include it. The loaders have gained support for body parameters, this was somehow omitted before.
26 lines
736 B
Handlebars
26 lines
736 B
Handlebars
using namespace {{dtoNamespace}};
|
|
|
|
{{#each endpoints as |e|}}
|
|
{{#if e.endpoint.hasSuccessResponse}}
|
|
|
|
{{#if e.endpoint.description.length > 0}}
|
|
/**
|
|
* @brief {{e.endpoint.description}}
|
|
|
|
*/
|
|
{{/if}}
|
|
|
|
|
|
class {{e.className}}Loader : public {{supportNamespace}}::HttpLoader<{{e.endpoint.resultType}}, {{e.endpoint.parameterType}}> {
|
|
public:
|
|
explicit {{e.className}}Loader(ApiClient *apiClient = nullptr);
|
|
|
|
protected:
|
|
QString path(const {{e.endpoint.parameterType}}& parameters) const override;
|
|
QUrlQuery query(const {{e.endpoint.parameterType}}& parameters) const override;
|
|
QByteArray body(const {{e.endpoint.parameterType}}& parameters) const override;
|
|
QNetworkAccessManager::Operation operation() const override;
|
|
};
|
|
{{/if}}
|
|
{{/each}}
|