/** * App client API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /* tslint:disable:no-unused-variable member-ordering */ import { Inject, Injectable, Optional } from '@angular/core'; import { HttpClient, HttpHeaders, HttpParams, HttpResponse, HttpEvent, HttpParameterCodec, HttpContext } from '@angular/common/http'; import { CustomHttpParameterCodec } from '../encoder'; import { Observable } from 'rxjs'; // @ts-ignore import { AddToCountrySubscribersListRequest } from '../model/addToCountrySubscribersListRequest'; // @ts-ignore import { AffiliateClickRequest } from '../model/affiliateClickRequest'; // @ts-ignore import { AnnouncementInfo } from '../model/announcementInfo'; // @ts-ignore import { AnnouncementPlatformType } from '../model/announcementPlatformType'; // @ts-ignore import { GetProductVersionResponse } from '../model/getProductVersionResponse'; // @ts-ignore import { InstrumentConfiguration } from '../model/instrumentConfiguration'; // @ts-ignore import { MarketPairOrderBook } from '../model/marketPairOrderBook'; // @ts-ignore import { OrderBookLevel } from '../model/orderBookLevel'; // @ts-ignore import { ProductConfiguration } from '../model/productConfiguration'; // @ts-ignore import { ProductVersionType } from '../model/productVersionType'; // @ts-ignore import { PublicCheckIfCryptoAddressBlocked200Response } from '../model/publicCheckIfCryptoAddressBlocked200Response'; // @ts-ignore import { PublicCheckIfUnderMaintenance200Response } from '../model/publicCheckIfUnderMaintenance200Response'; // @ts-ignore import { PublicGetDate200Response } from '../model/publicGetDate200Response'; // @ts-ignore import { PublicGetExchangeRates200Response } from '../model/publicGetExchangeRates200Response'; // @ts-ignore import { RecentTrade } from '../model/recentTrade'; // @ts-ignore import { SendOTCRequest } from '../model/sendOTCRequest'; // @ts-ignore import { SendOTCRequest2 } from '../model/sendOTCRequest2'; // @ts-ignore import { StakingMarketingData } from '../model/stakingMarketingData'; // @ts-ignore import { SubscribeToNewsRequest } from '../model/subscribeToNewsRequest'; // @ts-ignore import { WebConfig } from '../model/webConfig'; // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; import { Configuration } from '../configuration'; @Injectable({ providedIn: 'root' }) export class PublicService { protected basePath = 'http://localhost:5001/v1'; public defaultHeaders = new HttpHeaders(); public configuration = new Configuration(); public encoder: HttpParameterCodec; constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { if (configuration) { this.configuration = configuration; } if (typeof this.configuration.basePath !== 'string') { if (typeof basePath !== 'string') { basePath = this.basePath; } this.configuration.basePath = basePath; } this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); } private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); } else { httpParams = this.addToHttpParamsRecursive(httpParams, value, key); } return httpParams; } private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { if (value == null) { return httpParams; } if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); } else if (value instanceof Date) { if (key != null) { httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10)); } else { throw Error("key may not be null if value is Date"); } } else { Object.keys(value).forEach( k => httpParams = this.addToHttpParamsRecursive( httpParams, value[k], key != null ? `${key}.${k}` : k)); } } else if (key != null) { httpParams = httpParams.append(key, value); } else { throw Error("key may not be null if value is not object or array"); } return httpParams; } /** * @param addToCountrySubscribersListRequest * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ public publicAddToCountrySubscriberList(addToCountrySubscribersListRequest?: AddToCountrySubscribersListRequest, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; public publicAddToCountrySubscriberList(addToCountrySubscribersListRequest?: AddToCountrySubscribersListRequest, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; public publicAddToCountrySubscriberList(addToCountrySubscribersListRequest?: AddToCountrySubscribersListRequest, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; public publicAddToCountrySubscriberList(addToCountrySubscribersListRequest?: AddToCountrySubscribersListRequest, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { let localVarHeaders = this.defaultHeaders; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header const httpHeaderAccepts: string[] = [ ]; localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } let localVarHttpContext: HttpContext | undefined = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } // to determine the Content-Type header const consumes: string[] = [ 'application/json' ]; const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); } let responseType_: 'text' | 'json' | 'blob' = 'json'; if (localVarHttpHeaderAcceptSelected) { if (localVarHttpHeaderAcceptSelected.startsWith('text')) { responseType_ = 'text'; } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } return this.httpClient.post(`${this.configuration.basePath}/add-to-country-subscriber-list`, addToCountrySubscribersListRequest, { context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, reportProgress: reportProgress } ); } /** * @param address * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ public publicCheckIfCryptoAddressBlocked(address: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable; public publicCheckIfCryptoAddressBlocked(address: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; public publicCheckIfCryptoAddressBlocked(address: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; public publicCheckIfCryptoAddressBlocked(address: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable { if (address === null || address === undefined) { throw new Error('Required parameter address was null or undefined when calling publicCheckIfCryptoAddressBlocked.'); } let localVarHeaders = this.defaultHeaders; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header const httpHeaderAccepts: string[] = [ 'application/json' ]; localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } let localVarHttpContext: HttpContext | undefined = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } let responseType_: 'text' | 'json' | 'blob' = 'json'; if (localVarHttpHeaderAcceptSelected) { if (localVarHttpHeaderAcceptSelected.startsWith('text')) { responseType_ = 'text'; } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } return this.httpClient.get(`${this.configuration.basePath}/address-blocked/${encodeURIComponent(String(address))}`, { context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, reportProgress: reportProgress } ); } /** * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ public publicCheckIfUnderMaintenance(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable; public publicCheckIfUnderMaintenance(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; public publicCheckIfUnderMaintenance(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; public publicCheckIfUnderMaintenance(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable { let localVarHeaders = this.defaultHeaders; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header const httpHeaderAccepts: string[] = [ 'application/json' ]; localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } let localVarHttpContext: HttpContext | undefined = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } let responseType_: 'text' | 'json' | 'blob' = 'json'; if (localVarHttpHeaderAcceptSelected) { if (localVarHttpHeaderAcceptSelected.startsWith('text')) { responseType_ = 'text'; } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } return this.httpClient.get(`${this.configuration.basePath}/under-maintenanace`, { context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, reportProgress: reportProgress } ); } /** * @param platform * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ public publicGetActiveAnnouncements(platform?: AnnouncementPlatformType, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; public publicGetActiveAnnouncements(platform?: AnnouncementPlatformType, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>>; public publicGetActiveAnnouncements(platform?: AnnouncementPlatformType, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>>; public publicGetActiveAnnouncements(platform?: AnnouncementPlatformType, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable { let localVarQueryParameters = new HttpParams({encoder: this.encoder}); if (platform !== undefined && platform !== null) { localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, platform, 'platform'); } let localVarHeaders = this.defaultHeaders; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header const httpHeaderAccepts: string[] = [ 'application/json' ]; localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } let localVarHttpContext: HttpContext | undefined = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } let responseType_: 'text' | 'json' | 'blob' = 'json'; if (localVarHttpHeaderAcceptSelected) { if (localVarHttpHeaderAcceptSelected.startsWith('text')) { responseType_ = 'text'; } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } return this.httpClient.get>(`${this.configuration.basePath}/announcements`, { context: localVarHttpContext, params: localVarQueryParameters, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, reportProgress: reportProgress } ); } /** * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ public publicGetDate(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable; public publicGetDate(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; public publicGetDate(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; public publicGetDate(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable { let localVarHeaders = this.defaultHeaders; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header const httpHeaderAccepts: string[] = [ 'application/json' ]; localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } let localVarHttpContext: HttpContext | undefined = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } let responseType_: 'text' | 'json' | 'blob' = 'json'; if (localVarHttpHeaderAcceptSelected) { if (localVarHttpHeaderAcceptSelected.startsWith('text')) { responseType_ = 'text'; } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } return this.httpClient.get(`${this.configuration.basePath}/date`, { context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, reportProgress: reportProgress } ); } /** * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ public publicGetEnabledInstruments(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; public publicGetEnabledInstruments(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>>; public publicGetEnabledInstruments(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>>; public publicGetEnabledInstruments(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable { let localVarHeaders = this.defaultHeaders; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header const httpHeaderAccepts: string[] = [ 'application/json' ]; localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } let localVarHttpContext: HttpContext | undefined = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } let responseType_: 'text' | 'json' | 'blob' = 'json'; if (localVarHttpHeaderAcceptSelected) { if (localVarHttpHeaderAcceptSelected.startsWith('text')) { responseType_ = 'text'; } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } return this.httpClient.get>(`${this.configuration.basePath}/instruments`, { context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, reportProgress: reportProgress } ); } /** * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ public publicGetEnabledProducts(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; public publicGetEnabledProducts(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>>; public publicGetEnabledProducts(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>>; public publicGetEnabledProducts(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable { let localVarHeaders = this.defaultHeaders; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header const httpHeaderAccepts: string[] = [ 'application/json' ]; localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } let localVarHttpContext: HttpContext | undefined = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } let responseType_: 'text' | 'json' | 'blob' = 'json'; if (localVarHttpHeaderAcceptSelected) { if (localVarHttpHeaderAcceptSelected.startsWith('text')) { responseType_ = 'text'; } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } return this.httpClient.get>(`${this.configuration.basePath}/products`, { context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, reportProgress: reportProgress } ); } /** * @param symbol1 * @param symbol2 * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ public publicGetExchangeRates(symbol1: string, symbol2: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable; public publicGetExchangeRates(symbol1: string, symbol2: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; public publicGetExchangeRates(symbol1: string, symbol2: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; public publicGetExchangeRates(symbol1: string, symbol2: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable { if (symbol1 === null || symbol1 === undefined) { throw new Error('Required parameter symbol1 was null or undefined when calling publicGetExchangeRates.'); } if (symbol2 === null || symbol2 === undefined) { throw new Error('Required parameter symbol2 was null or undefined when calling publicGetExchangeRates.'); } let localVarHeaders = this.defaultHeaders; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header const httpHeaderAccepts: string[] = [ 'application/json' ]; localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } let localVarHttpContext: HttpContext | undefined = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } let responseType_: 'text' | 'json' | 'blob' = 'json'; if (localVarHttpHeaderAcceptSelected) { if (localVarHttpHeaderAcceptSelected.startsWith('text')) { responseType_ = 'text'; } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } return this.httpClient.get(`${this.configuration.basePath}/exchange-rates/${encodeURIComponent(String(symbol1))}/${encodeURIComponent(String(symbol2))}`, { context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, reportProgress: reportProgress } ); } /** * @param symbol * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ public publicGetFiatExchangeRates(symbol: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable; public publicGetFiatExchangeRates(symbol: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; public publicGetFiatExchangeRates(symbol: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; public publicGetFiatExchangeRates(symbol: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable { if (symbol === null || symbol === undefined) { throw new Error('Required parameter symbol was null or undefined when calling publicGetFiatExchangeRates.'); } let localVarHeaders = this.defaultHeaders; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header const httpHeaderAccepts: string[] = [ 'application/json' ]; localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } let localVarHttpContext: HttpContext | undefined = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } let responseType_: 'text' | 'json' | 'blob' = 'json'; if (localVarHttpHeaderAcceptSelected) { if (localVarHttpHeaderAcceptSelected.startsWith('text')) { responseType_ = 'text'; } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } return this.httpClient.get(`${this.configuration.basePath}/fiat-exchange-rates/${encodeURIComponent(String(symbol))}`, { context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, reportProgress: reportProgress } ); } /** * @param pair * @param depth * @param level * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ public publicGetOrderBook(pair: string, depth: number, level: OrderBookLevel, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable; public publicGetOrderBook(pair: string, depth: number, level: OrderBookLevel, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; public publicGetOrderBook(pair: string, depth: number, level: OrderBookLevel, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; public publicGetOrderBook(pair: string, depth: number, level: OrderBookLevel, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable { if (pair === null || pair === undefined) { throw new Error('Required parameter pair was null or undefined when calling publicGetOrderBook.'); } if (depth === null || depth === undefined) { throw new Error('Required parameter depth was null or undefined when calling publicGetOrderBook.'); } if (level === null || level === undefined) { throw new Error('Required parameter level was null or undefined when calling publicGetOrderBook.'); } let localVarQueryParameters = new HttpParams({encoder: this.encoder}); if (depth !== undefined && depth !== null) { localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, depth, 'depth'); } if (level !== undefined && level !== null) { localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, level, 'level'); } let localVarHeaders = this.defaultHeaders; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header const httpHeaderAccepts: string[] = [ 'application/json' ]; localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } let localVarHttpContext: HttpContext | undefined = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } let responseType_: 'text' | 'json' | 'blob' = 'json'; if (localVarHttpHeaderAcceptSelected) { if (localVarHttpHeaderAcceptSelected.startsWith('text')) { responseType_ = 'text'; } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } return this.httpClient.get(`${this.configuration.basePath}/orderbook/${encodeURIComponent(String(pair))}`, { context: localVarHttpContext, params: localVarQueryParameters, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, reportProgress: reportProgress } ); } /** * @param productType * @param version * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ public publicGetProductVersion(productType: ProductVersionType, version: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable; public publicGetProductVersion(productType: ProductVersionType, version: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; public publicGetProductVersion(productType: ProductVersionType, version: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; public publicGetProductVersion(productType: ProductVersionType, version: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable { if (productType === null || productType === undefined) { throw new Error('Required parameter productType was null or undefined when calling publicGetProductVersion.'); } if (version === null || version === undefined) { throw new Error('Required parameter version was null or undefined when calling publicGetProductVersion.'); } let localVarHeaders = this.defaultHeaders; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header const httpHeaderAccepts: string[] = [ 'application/json' ]; localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } let localVarHttpContext: HttpContext | undefined = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } let responseType_: 'text' | 'json' | 'blob' = 'json'; if (localVarHttpHeaderAcceptSelected) { if (localVarHttpHeaderAcceptSelected.startsWith('text')) { responseType_ = 'text'; } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } return this.httpClient.get(`${this.configuration.basePath}/product-version/${encodeURIComponent(String(productType))}/${encodeURIComponent(String(version))}`, { context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, reportProgress: reportProgress } ); } /** * @param pair * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ public publicGetRecentTrades(pair: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; public publicGetRecentTrades(pair: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>>; public publicGetRecentTrades(pair: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>>; public publicGetRecentTrades(pair: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable { if (pair === null || pair === undefined) { throw new Error('Required parameter pair was null or undefined when calling publicGetRecentTrades.'); } let localVarHeaders = this.defaultHeaders; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header const httpHeaderAccepts: string[] = [ 'application/json' ]; localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } let localVarHttpContext: HttpContext | undefined = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } let responseType_: 'text' | 'json' | 'blob' = 'json'; if (localVarHttpHeaderAcceptSelected) { if (localVarHttpHeaderAcceptSelected.startsWith('text')) { responseType_ = 'text'; } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } return this.httpClient.get>(`${this.configuration.basePath}/trades/${encodeURIComponent(String(pair))}`, { context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, reportProgress: reportProgress } ); } /** * @param symbol * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ public publicGetStakingMarketingData(symbol: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; public publicGetStakingMarketingData(symbol: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>>; public publicGetStakingMarketingData(symbol: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>>; public publicGetStakingMarketingData(symbol: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable { if (symbol === null || symbol === undefined) { throw new Error('Required parameter symbol was null or undefined when calling publicGetStakingMarketingData.'); } let localVarHeaders = this.defaultHeaders; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header const httpHeaderAccepts: string[] = [ 'application/json' ]; localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } let localVarHttpContext: HttpContext | undefined = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } let responseType_: 'text' | 'json' | 'blob' = 'json'; if (localVarHttpHeaderAcceptSelected) { if (localVarHttpHeaderAcceptSelected.startsWith('text')) { responseType_ = 'text'; } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } return this.httpClient.get>(`${this.configuration.basePath}/staking-marketing/${encodeURIComponent(String(symbol))}`, { context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, reportProgress: reportProgress } ); } /** * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ public publicGetTicker(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable; public publicGetTicker(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; public publicGetTicker(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; public publicGetTicker(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable { let localVarHeaders = this.defaultHeaders; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header const httpHeaderAccepts: string[] = [ 'application/json' ]; localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } let localVarHttpContext: HttpContext | undefined = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } let responseType_: 'text' | 'json' | 'blob' = 'json'; if (localVarHttpHeaderAcceptSelected) { if (localVarHttpHeaderAcceptSelected.startsWith('text')) { responseType_ = 'text'; } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } return this.httpClient.get(`${this.configuration.basePath}/ticker`, { context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, reportProgress: reportProgress } ); } /** * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ public publicGetTickerBTC(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable; public publicGetTickerBTC(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; public publicGetTickerBTC(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; public publicGetTickerBTC(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable { let localVarHeaders = this.defaultHeaders; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header const httpHeaderAccepts: string[] = [ 'application/json' ]; localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } let localVarHttpContext: HttpContext | undefined = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } let responseType_: 'text' | 'json' | 'blob' = 'json'; if (localVarHttpHeaderAcceptSelected) { if (localVarHttpHeaderAcceptSelected.startsWith('text')) { responseType_ = 'text'; } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } return this.httpClient.get(`${this.configuration.basePath}/ticker-btc`, { context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, reportProgress: reportProgress } ); } /** * @param hash * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ public publicGetWebConfig(hash?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable; public publicGetWebConfig(hash?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; public publicGetWebConfig(hash?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; public publicGetWebConfig(hash?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable { let localVarQueryParameters = new HttpParams({encoder: this.encoder}); if (hash !== undefined && hash !== null) { localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, hash, 'hash'); } let localVarHeaders = this.defaultHeaders; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header const httpHeaderAccepts: string[] = [ 'application/json' ]; localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } let localVarHttpContext: HttpContext | undefined = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } let responseType_: 'text' | 'json' | 'blob' = 'json'; if (localVarHttpHeaderAcceptSelected) { if (localVarHttpHeaderAcceptSelected.startsWith('text')) { responseType_ = 'text'; } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } return this.httpClient.get(`${this.configuration.basePath}/web-config`, { context: localVarHttpContext, params: localVarQueryParameters, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, reportProgress: reportProgress } ); } /** * @param affiliateClickRequest * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ public publicOnAffiliateClick(affiliateClickRequest?: AffiliateClickRequest, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; public publicOnAffiliateClick(affiliateClickRequest?: AffiliateClickRequest, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; public publicOnAffiliateClick(affiliateClickRequest?: AffiliateClickRequest, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; public publicOnAffiliateClick(affiliateClickRequest?: AffiliateClickRequest, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { let localVarHeaders = this.defaultHeaders; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header const httpHeaderAccepts: string[] = [ ]; localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } let localVarHttpContext: HttpContext | undefined = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } // to determine the Content-Type header const consumes: string[] = [ 'application/json' ]; const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); } let responseType_: 'text' | 'json' | 'blob' = 'json'; if (localVarHttpHeaderAcceptSelected) { if (localVarHttpHeaderAcceptSelected.startsWith('text')) { responseType_ = 'text'; } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } return this.httpClient.post(`${this.configuration.basePath}/affiliate-click`, affiliateClickRequest, { context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, reportProgress: reportProgress } ); } /** * @param sendOTCRequest * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ public publicSendOTCRequest(sendOTCRequest?: SendOTCRequest, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; public publicSendOTCRequest(sendOTCRequest?: SendOTCRequest, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; public publicSendOTCRequest(sendOTCRequest?: SendOTCRequest, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; public publicSendOTCRequest(sendOTCRequest?: SendOTCRequest, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { let localVarHeaders = this.defaultHeaders; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header const httpHeaderAccepts: string[] = [ ]; localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } let localVarHttpContext: HttpContext | undefined = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } // to determine the Content-Type header const consumes: string[] = [ 'application/json' ]; const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); } let responseType_: 'text' | 'json' | 'blob' = 'json'; if (localVarHttpHeaderAcceptSelected) { if (localVarHttpHeaderAcceptSelected.startsWith('text')) { responseType_ = 'text'; } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } return this.httpClient.post(`${this.configuration.basePath}/otc`, sendOTCRequest, { context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, reportProgress: reportProgress } ); } /** * @param sendOTCRequest2 * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ public publicSendOTCRequest2(sendOTCRequest2?: SendOTCRequest2, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; public publicSendOTCRequest2(sendOTCRequest2?: SendOTCRequest2, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; public publicSendOTCRequest2(sendOTCRequest2?: SendOTCRequest2, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; public publicSendOTCRequest2(sendOTCRequest2?: SendOTCRequest2, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { let localVarHeaders = this.defaultHeaders; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header const httpHeaderAccepts: string[] = [ ]; localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } let localVarHttpContext: HttpContext | undefined = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } // to determine the Content-Type header const consumes: string[] = [ 'application/json' ]; const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); } let responseType_: 'text' | 'json' | 'blob' = 'json'; if (localVarHttpHeaderAcceptSelected) { if (localVarHttpHeaderAcceptSelected.startsWith('text')) { responseType_ = 'text'; } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } return this.httpClient.post(`${this.configuration.basePath}/otc2`, sendOTCRequest2, { context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, reportProgress: reportProgress } ); } /** * @param subscribeToNewsRequest * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ public publicSubscribeToNews(subscribeToNewsRequest?: SubscribeToNewsRequest, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; public publicSubscribeToNews(subscribeToNewsRequest?: SubscribeToNewsRequest, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; public publicSubscribeToNews(subscribeToNewsRequest?: SubscribeToNewsRequest, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; public publicSubscribeToNews(subscribeToNewsRequest?: SubscribeToNewsRequest, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { let localVarHeaders = this.defaultHeaders; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header const httpHeaderAccepts: string[] = [ ]; localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } let localVarHttpContext: HttpContext | undefined = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } // to determine the Content-Type header const consumes: string[] = [ 'application/json' ]; const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); } let responseType_: 'text' | 'json' | 'blob' = 'json'; if (localVarHttpHeaderAcceptSelected) { if (localVarHttpHeaderAcceptSelected.startsWith('text')) { responseType_ = 'text'; } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } return this.httpClient.post(`${this.configuration.basePath}/subscribe-to-news`, subscribeToNewsRequest, { context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, reportProgress: reportProgress } ); } }