mirror of
https://github.com/HenkKalkwater/harbour-sailfin.git
synced 2025-09-04 01:42:44 +00:00
WIP: Refractor C++-side. Loader should be working again
This commit is contained in:
parent
2360b261f7
commit
9643482ae1
840 changed files with 100813 additions and 23560 deletions
|
@ -1,2 +1,34 @@
|
|||
{{#if endpoint.hasSuccessResponse}}
|
||||
|
||||
{{className}}::{{className}}(ApiClient *apiClient)
|
||||
: Loader<>(apiClient) {}
|
||||
: {{supportNamespace}}::HttpLoader<{{dtoNamespace}}::{{endpoint.resultType}}, {{endpoint.parameterType}}>(apiClient) {}
|
||||
|
||||
QString {{className}}::path(const {{endpoint.parameterType}} ¶ms) const {
|
||||
Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings
|
||||
|
||||
return {{pathStringInterpolation "params"}};
|
||||
}
|
||||
|
||||
QUrlQuery {{className}}::query(const {{endpoint.parameterType}} ¶ms) const {
|
||||
Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings
|
||||
|
||||
QUrlQuery result;
|
||||
|
||||
{{#each endpoint.requiredQueryParameters as |p|}}
|
||||
result.addQueryItem("{{p.name}}", params.{{p.type.name}}());
|
||||
|
||||
{{/each}}
|
||||
|
||||
// Optional parameters
|
||||
|
||||
{{#each endpoint.optionalQueryParameters as |p|}}
|
||||
if (!params.{{p.type.name}}Null()) {
|
||||
result.addQueryItem("{{p.name}}", Support::toString(params.{{p.type.name}}()));
|
||||
}
|
||||
|
||||
{{/each}}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
{{/if}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue