mirror of
https://github.com/HenkKalkwater/harbour-sailfin.git
synced 2025-09-04 01:42:44 +00:00
openapigen: support for 204 No Content endpoints
This commit is contained in:
parent
b257fe60aa
commit
77cb5d5957
66 changed files with 6169 additions and 84 deletions
|
@ -70,6 +70,36 @@ QNetworkAccessManager::Operation GetDevicesLoader::operation() const {
|
|||
|
||||
}
|
||||
|
||||
DeleteDeviceLoader::DeleteDeviceLoader(ApiClient *apiClient)
|
||||
: Jellyfin::Support::HttpLoader<void, DeleteDeviceParams>(apiClient) {}
|
||||
|
||||
QString DeleteDeviceLoader::path(const DeleteDeviceParams ¶ms) const {
|
||||
Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings
|
||||
|
||||
return QStringLiteral("/Devices");
|
||||
}
|
||||
|
||||
QUrlQuery DeleteDeviceLoader::query(const DeleteDeviceParams ¶ms) const {
|
||||
Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings
|
||||
|
||||
QUrlQuery result;
|
||||
result.addQueryItem("id", Support::toString<QString>(params.jellyfinId()));
|
||||
|
||||
// Optional parameters
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
QByteArray DeleteDeviceLoader::body(const DeleteDeviceParams ¶ms) const {
|
||||
return QByteArray();
|
||||
}
|
||||
|
||||
QNetworkAccessManager::Operation DeleteDeviceLoader::operation() const {
|
||||
// HTTP method Delete
|
||||
return QNetworkAccessManager::DeleteOperation;
|
||||
|
||||
}
|
||||
|
||||
GetDeviceInfoLoader::GetDeviceInfoLoader(ApiClient *apiClient)
|
||||
: Jellyfin::Support::HttpLoader<DeviceInfo, GetDeviceInfoParams>(apiClient) {}
|
||||
|
||||
|
@ -130,6 +160,36 @@ QNetworkAccessManager::Operation GetDeviceOptionsLoader::operation() const {
|
|||
|
||||
}
|
||||
|
||||
UpdateDeviceOptionsLoader::UpdateDeviceOptionsLoader(ApiClient *apiClient)
|
||||
: Jellyfin::Support::HttpLoader<void, UpdateDeviceOptionsParams>(apiClient) {}
|
||||
|
||||
QString UpdateDeviceOptionsLoader::path(const UpdateDeviceOptionsParams ¶ms) const {
|
||||
Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings
|
||||
|
||||
return QStringLiteral("/Devices/Options");
|
||||
}
|
||||
|
||||
QUrlQuery UpdateDeviceOptionsLoader::query(const UpdateDeviceOptionsParams ¶ms) const {
|
||||
Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings
|
||||
|
||||
QUrlQuery result;
|
||||
result.addQueryItem("id", Support::toString<QString>(params.jellyfinId()));
|
||||
|
||||
// Optional parameters
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
QByteArray UpdateDeviceOptionsLoader::body(const UpdateDeviceOptionsParams ¶ms) const {
|
||||
return Support::toString<QSharedPointer<DeviceOptions>>(params.body()).toUtf8();
|
||||
}
|
||||
|
||||
QNetworkAccessManager::Operation UpdateDeviceOptionsLoader::operation() const {
|
||||
// HTTP method Post
|
||||
return QNetworkAccessManager::PostOperation;
|
||||
|
||||
}
|
||||
|
||||
|
||||
} // NS HTTP
|
||||
} // NS Loader
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue