jellyfin-discord-bot/server/jellyfin/apis/TimeSyncApi.ts

57 lines
1.5 KiB
TypeScript
Raw Permalink Normal View History

2023-05-04 23:34:53 +02:00
/* tslint:disable */
/* eslint-disable */
/**
* Jellyfin API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 10.8.9
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import * as runtime from '../runtime';
import type {
UtcTimeResponse,
} from '../models';
import {
UtcTimeResponseFromJSON,
UtcTimeResponseToJSON,
} from '../models';
/**
*
*/
export class TimeSyncApi extends runtime.BaseAPI {
/**
* Gets the current UTC time.
*/
async getUtcTimeRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UtcTimeResponse>> {
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
const response = await this.request({
path: `/GetUtcTime`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => UtcTimeResponseFromJSON(jsonValue));
}
/**
* Gets the current UTC time.
*/
async getUtcTime(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UtcTimeResponse> {
const response = await this.getUtcTimeRaw(initOverrides);
return await response.value();
}
}