/* tslint:disable */ /* eslint-disable */ /** * Section API * Get edgey with the Section API * * OpenAPI spec version: 1.0.0 * * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; import { Configuration } from '../configuration'; // Some imports not used depending on template conditions // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; import { HelpContent } from '../models'; /** * HelpApi - axios parameter creator * @export */ export const HelpApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * Gets contextual help content by identifier * @param {string} helpId Identifier for contextual help * @param {*} [options] Override http request option. * @throws {RequiredError} */ helpGet: async (helpId: string, options: any = {}): Promise => { // verify required parameter 'helpId' is not null or undefined if (helpId === null || helpId === undefined) { throw new RequiredError('helpId','Required parameter helpId was null or undefined when calling helpGet.'); } const localVarPath = `/help/{helpId}` .replace(`{${"helpId"}}`, encodeURIComponent(String(helpId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, 'https://example.com'); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basic required // authentication keyInQuery required if (configuration && configuration.apiKey) { const localVarApiKeyValue = typeof configuration.apiKey === 'function' ? await configuration.apiKey("access_token") : await configuration.apiKey; localVarQueryParameter["access_token"] = localVarApiKeyValue; } const query = new URLSearchParams(localVarUrlObj.search); for (const key in localVarQueryParameter) { query.set(key, localVarQueryParameter[key]); } for (const key in options.query) { query.set(key, options.query[key]); } localVarUrlObj.search = (new URLSearchParams(query)).toString(); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, options: localVarRequestOptions, }; }, } }; /** * HelpApi - functional programming interface * @export */ export const HelpApiFp = function(configuration?: Configuration) { return { /** * Gets contextual help content by identifier * @param {string} helpId Identifier for contextual help * @param {*} [options] Override http request option. * @throws {RequiredError} */ async helpGet(helpId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await HelpApiAxiosParamCreator(configuration).helpGet(helpId, options); return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; return axios.request(axiosRequestArgs); }; }, } }; /** * HelpApi - factory interface * @export */ export const HelpApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { return { /** * Gets contextual help content by identifier * @param {string} helpId Identifier for contextual help * @param {*} [options] Override http request option. * @throws {RequiredError} */ helpGet(helpId: string, options?: any): AxiosPromise { return HelpApiFp(configuration).helpGet(helpId, options).then((request) => request(axios, basePath)); }, }; }; /** * HelpApi - object-oriented interface * @export * @class HelpApi * @extends {BaseAPI} */ export class HelpApi extends BaseAPI { /** * Gets contextual help content by identifier * @param {string} helpId Identifier for contextual help * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof HelpApi */ public helpGet(helpId: string, options?: any) { return HelpApiFp(this.configuration).helpGet(helpId, options).then((request) => request(this.axios, this.basePath)); } }