/* * Sailfin: a Jellyfin client written using Qt * Copyright (C) 2021 Chris Josten and the Sailfin Contributors. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* * WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET * OVERWRITTEN AT SOME POINT! * * If there is a bug in this file, please fix the code generator used to generate this file found in * core/openapigenerator.d. * * This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that * file with a newer file if needed instead of manually updating the files. */ #include namespace Jellyfin { namespace Loader { namespace HTTP { using namespace Jellyfin::DTO; GetUsersLoader::GetUsersLoader(ApiClient *apiClient) : Jellyfin::Support::HttpLoader, GetUsersParams>(apiClient) {} QString GetUsersLoader::path(const GetUsersParams ¶ms) const { Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings return QStringLiteral("/Users"); } QUrlQuery GetUsersLoader::query(const GetUsersParams ¶ms) const { Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings QUrlQuery result; // Optional parameters if (!params.isHiddenNull()) { result.addQueryItem("isHidden", Support::toString>(params.isHidden())); } if (!params.isDisabledNull()) { result.addQueryItem("isDisabled", Support::toString>(params.isDisabled())); } return result; } QByteArray GetUsersLoader::body(const GetUsersParams ¶ms) const { return QByteArray(); } QNetworkAccessManager::Operation GetUsersLoader::operation() const { // HTTP method Get return QNetworkAccessManager::GetOperation; } GetUserByIdLoader::GetUserByIdLoader(ApiClient *apiClient) : Jellyfin::Support::HttpLoader(apiClient) {} QString GetUserByIdLoader::path(const GetUserByIdParams ¶ms) const { Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings return QStringLiteral("/Users/") + Support::toString< QString>(params.userId()) ; } QUrlQuery GetUserByIdLoader::query(const GetUserByIdParams ¶ms) const { Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings QUrlQuery result; // Optional parameters return result; } QByteArray GetUserByIdLoader::body(const GetUserByIdParams ¶ms) const { return QByteArray(); } QNetworkAccessManager::Operation GetUserByIdLoader::operation() const { // HTTP method Get return QNetworkAccessManager::GetOperation; } AuthenticateUserLoader::AuthenticateUserLoader(ApiClient *apiClient) : Jellyfin::Support::HttpLoader(apiClient) {} QString AuthenticateUserLoader::path(const AuthenticateUserParams ¶ms) const { Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings return QStringLiteral("/Users/") + Support::toString< QString>(params.userId()) + QStringLiteral("/Authenticate"); } QUrlQuery AuthenticateUserLoader::query(const AuthenticateUserParams ¶ms) const { Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings QUrlQuery result; result.addQueryItem("pw", Support::toString(params.pw())); // Optional parameters if (!params.passwordNull()) { result.addQueryItem("password", Support::toString(params.password())); } return result; } QByteArray AuthenticateUserLoader::body(const AuthenticateUserParams ¶ms) const { return QByteArray(); } QNetworkAccessManager::Operation AuthenticateUserLoader::operation() const { // HTTP method Post return QNetworkAccessManager::PostOperation; } AuthenticateUserByNameLoader::AuthenticateUserByNameLoader(ApiClient *apiClient) : Jellyfin::Support::HttpLoader(apiClient) {} QString AuthenticateUserByNameLoader::path(const AuthenticateUserByNameParams ¶ms) const { Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings return QStringLiteral("/Users/AuthenticateByName"); } QUrlQuery AuthenticateUserByNameLoader::query(const AuthenticateUserByNameParams ¶ms) const { Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings QUrlQuery result; // Optional parameters return result; } QByteArray AuthenticateUserByNameLoader::body(const AuthenticateUserByNameParams ¶ms) const { return Support::toString>(params.body()).toUtf8(); } QNetworkAccessManager::Operation AuthenticateUserByNameLoader::operation() const { // HTTP method Post return QNetworkAccessManager::PostOperation; } AuthenticateWithQuickConnectLoader::AuthenticateWithQuickConnectLoader(ApiClient *apiClient) : Jellyfin::Support::HttpLoader(apiClient) {} QString AuthenticateWithQuickConnectLoader::path(const AuthenticateWithQuickConnectParams ¶ms) const { Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings return QStringLiteral("/Users/AuthenticateWithQuickConnect"); } QUrlQuery AuthenticateWithQuickConnectLoader::query(const AuthenticateWithQuickConnectParams ¶ms) const { Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings QUrlQuery result; // Optional parameters return result; } QByteArray AuthenticateWithQuickConnectLoader::body(const AuthenticateWithQuickConnectParams ¶ms) const { return Support::toString>(params.body()).toUtf8(); } QNetworkAccessManager::Operation AuthenticateWithQuickConnectLoader::operation() const { // HTTP method Post return QNetworkAccessManager::PostOperation; } ForgotPasswordLoader::ForgotPasswordLoader(ApiClient *apiClient) : Jellyfin::Support::HttpLoader(apiClient) {} QString ForgotPasswordLoader::path(const ForgotPasswordParams ¶ms) const { Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings return QStringLiteral("/Users/ForgotPassword"); } QUrlQuery ForgotPasswordLoader::query(const ForgotPasswordParams ¶ms) const { Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings QUrlQuery result; // Optional parameters return result; } QByteArray ForgotPasswordLoader::body(const ForgotPasswordParams ¶ms) const { return Support::toString>(params.body()).toUtf8(); } QNetworkAccessManager::Operation ForgotPasswordLoader::operation() const { // HTTP method Post return QNetworkAccessManager::PostOperation; } ForgotPasswordPinLoader::ForgotPasswordPinLoader(ApiClient *apiClient) : Jellyfin::Support::HttpLoader(apiClient) {} QString ForgotPasswordPinLoader::path(const ForgotPasswordPinParams ¶ms) const { Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings return QStringLiteral("/Users/ForgotPassword/Pin"); } QUrlQuery ForgotPasswordPinLoader::query(const ForgotPasswordPinParams ¶ms) const { Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings QUrlQuery result; // Optional parameters return result; } QByteArray ForgotPasswordPinLoader::body(const ForgotPasswordPinParams ¶ms) const { return Support::toString(params.body()).toUtf8(); } QNetworkAccessManager::Operation ForgotPasswordPinLoader::operation() const { // HTTP method Post return QNetworkAccessManager::PostOperation; } GetCurrentUserLoader::GetCurrentUserLoader(ApiClient *apiClient) : Jellyfin::Support::HttpLoader(apiClient) {} QString GetCurrentUserLoader::path(const GetCurrentUserParams ¶ms) const { Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings return QStringLiteral("/Users/Me"); } QUrlQuery GetCurrentUserLoader::query(const GetCurrentUserParams ¶ms) const { Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings QUrlQuery result; // Optional parameters return result; } QByteArray GetCurrentUserLoader::body(const GetCurrentUserParams ¶ms) const { return QByteArray(); } QNetworkAccessManager::Operation GetCurrentUserLoader::operation() const { // HTTP method Get return QNetworkAccessManager::GetOperation; } CreateUserByNameLoader::CreateUserByNameLoader(ApiClient *apiClient) : Jellyfin::Support::HttpLoader(apiClient) {} QString CreateUserByNameLoader::path(const CreateUserByNameParams ¶ms) const { Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings return QStringLiteral("/Users/New"); } QUrlQuery CreateUserByNameLoader::query(const CreateUserByNameParams ¶ms) const { Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings QUrlQuery result; // Optional parameters return result; } QByteArray CreateUserByNameLoader::body(const CreateUserByNameParams ¶ms) const { return Support::toString>(params.body()).toUtf8(); } QNetworkAccessManager::Operation CreateUserByNameLoader::operation() const { // HTTP method Post return QNetworkAccessManager::PostOperation; } GetPublicUsersLoader::GetPublicUsersLoader(ApiClient *apiClient) : Jellyfin::Support::HttpLoader, GetPublicUsersParams>(apiClient) {} QString GetPublicUsersLoader::path(const GetPublicUsersParams ¶ms) const { Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings return QStringLiteral("/Users/Public"); } QUrlQuery GetPublicUsersLoader::query(const GetPublicUsersParams ¶ms) const { Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings QUrlQuery result; // Optional parameters return result; } QByteArray GetPublicUsersLoader::body(const GetPublicUsersParams ¶ms) const { return QByteArray(); } QNetworkAccessManager::Operation GetPublicUsersLoader::operation() const { // HTTP method Get return QNetworkAccessManager::GetOperation; } } // NS HTTP } // NS Loader } // NS Jellyfin