/**
 * FinFeedAPI Stock REST API
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: v1
 * Contact: support@apibricks.io
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 *
 */


import ApiClient from "../ApiClient";
import FinFeedAPIExchangeModel from '../model/FinFeedAPIExchangeModel';
import FinFeedAPISymbolModel from '../model/FinFeedAPISymbolModel';

/**
* Metadata service.
* @module api/MetadataApi
* @version v1
*/
export default class MetadataApi {

    /**
    * Constructs a new MetadataApi. 
    * @alias module:api/MetadataApi
    * @class
    * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
    * default to {@link module:ApiClient#instance} if unspecified.
    */
    constructor(apiClient) {
        this.apiClient = apiClient || ApiClient.instance;
    }


    /**
     * Callback function to receive the result of the v1ExchangesGet operation.
     * @callback module:api/MetadataApi~v1ExchangesGetCallback
     * @param {String} error Error message, if any.
     * @param {Array.<module:model/FinFeedAPIExchangeModel>} data The data returned by the service call.
     * @param {String} response The complete HTTP response.
     */

    /**
     * List of exchanges
     * @param {module:api/MetadataApi~v1ExchangesGetCallback} callback The callback function, accepting three arguments: error, data, response
     * data is of type: {@link Array.<module:model/FinFeedAPIExchangeModel>}
     */
    v1ExchangesGet(callback) {
      let postBody = null;

      let pathParams = {
      };
      let queryParams = {
      };
      let headerParams = {
      };
      let formParams = {
      };

      let authNames = ['APIKey', 'JWT'];
      let contentTypes = [];
      let accepts = ['text/plain', 'application/json', 'text/json'];
      let returnType = [FinFeedAPIExchangeModel];
      return this.apiClient.callApi(
        '/v1/exchanges', 'GET',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, null, callback
      );
    }

    /**
     * Callback function to receive the result of the v1SymbolsExchangeIdGet operation.
     * @callback module:api/MetadataApi~v1SymbolsExchangeIdGetCallback
     * @param {String} error Error message, if any.
     * @param {Array.<module:model/FinFeedAPISymbolModel>} data The data returned by the service call.
     * @param {String} response The complete HTTP response.
     */

    /**
     * List of symbols for the exchange
     * @param {String} exchangeId 
     * @param {module:api/MetadataApi~v1SymbolsExchangeIdGetCallback} callback The callback function, accepting three arguments: error, data, response
     * data is of type: {@link Array.<module:model/FinFeedAPISymbolModel>}
     */
    v1SymbolsExchangeIdGet(exchangeId, callback) {
      let postBody = null;
      // verify the required parameter 'exchangeId' is set
      if (exchangeId === undefined || exchangeId === null) {
        throw new Error("Missing the required parameter 'exchangeId' when calling v1SymbolsExchangeIdGet");
      }

      let pathParams = {
        'exchange_id': exchangeId
      };
      let queryParams = {
      };
      let headerParams = {
      };
      let formParams = {
      };

      let authNames = ['APIKey', 'JWT'];
      let contentTypes = [];
      let accepts = ['text/plain', 'application/json', 'text/json'];
      let returnType = [FinFeedAPISymbolModel];
      return this.apiClient.callApi(
        '/v1/symbols/{exchange_id}', 'GET',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, null, callback
      );
    }


}
