/**
 * CoinAPI Market Data 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 OptionsOptionExchangeGroup from '../model/OptionsOptionExchangeGroup';

/**
* Options service.
* @module api/OptionsApi
* @version v1
*/
export default class OptionsApi {

    /**
    * Constructs a new OptionsApi. 
    * @alias module:api/OptionsApi
    * @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 v1OptionsExchangeIdCurrentGet operation.
     * @callback module:api/OptionsApi~v1OptionsExchangeIdCurrentGetCallback
     * @param {String} error Error message, if any.
     * @param {Array.<module:model/OptionsOptionExchangeGroup>} data The data returned by the service call.
     * @param {String} response The complete HTTP response.
     */

    /**
     * Current data by Exchange
     * Get current options data for a specific exchange.  Returns option data grouped by underlying asset, quote currency, and expiration time, with quotes for both calls and puts at each strike price.
     * @param {String} exchangeId Exchange identifier (from the Metadata -> Exchanges)
     * @param {module:api/OptionsApi~v1OptionsExchangeIdCurrentGetCallback} callback The callback function, accepting three arguments: error, data, response
     * data is of type: {@link Array.<module:model/OptionsOptionExchangeGroup>}
     */
    v1OptionsExchangeIdCurrentGet(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 v1OptionsExchangeIdCurrentGet");
      }

      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', 'application/x-msgpack'];
      let returnType = [OptionsOptionExchangeGroup];
      return this.apiClient.callApi(
        '/v1/options/{exchange_id}/current', 'GET',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, null, callback
      );
    }


}
