/**
 * @fileoverview AUTOMATICALLY GENERATED service for API.Client.MetadataApi.
 * Do not edit this file by hand or your changes will be lost next time it is
 * generated.
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 * Version: v1
* Generator version: 7.14.0
 * Generated by: org.openapitools.codegen.languages.JavascriptClosureAngularClientCodegen
 */
/**
 * @license MIT License
 * https://github.com/api-bricks/api-bricks-sdk/blob/master/LICENSE
 */

goog.provide('API.Client.MetadataApi');

goog.require('API.Client.v1.Asset');
goog.require('API.Client.v1.Icon');

/**
 * @constructor
 * @param {!angular.$http} $http
 * @param {!Object} $httpParamSerializer
 * @param {!angular.$injector} $injector
 * @struct
 */
API.Client.MetadataApi = function($http, $httpParamSerializer, $injector) {
  /** @private {!string} */
  this.basePath_ = $injector.has('MetadataApiBasePath') ?
                   /** @type {!string} */ ($injector.get('MetadataApiBasePath')) :
                   'https://api-historical.fx.finfeedapi.com';

  /** @private {!Object<string, string>} */
  this.defaultHeaders_ = $injector.has('MetadataApiDefaultHeaders') ?
                   /** @type {!Object<string, string>} */ (
                       $injector.get('MetadataApiDefaultHeaders')) :
                   {};

  /** @private {!angular.$http} */
  this.http_ = $http;

  /** @package {!Object} */
  this.httpParamSerializer = $injector.get('$httpParamSerializer');
}
API.Client.MetadataApi.$inject = ['$http', '$httpParamSerializer', '$injector'];

/**
 * List all assets by asset ID
 * 
 * @param {!string} assetId The asset ID.
 * @param {!angular.$http.Config=} opt_extraHttpRequestParams Extra HTTP parameters to send.
 * @return {!angular.$q.Promise<!Array<!API.Client.v1.Asset>>}
 */
API.Client.MetadataApi.prototype.v1AssetsAssetIdGet = function(assetId, opt_extraHttpRequestParams) {
  /** @const {string} */
  var path = this.basePath_ + '/v1/assets/{asset_id}'
      .replace('{' + 'asset_id' + '}', String(assetId));

  /** @type {!Object} */
  var queryParameters = {};

  /** @type {!Object} */
  var headerParams = angular.extend({}, this.defaultHeaders_);
  // verify required parameter 'assetId' is set
  if (!assetId) {
    throw new Error('Missing required parameter assetId when calling v1AssetsAssetIdGet');
  }
  /** @type {!Object} */
  var httpRequestParams = {
    method: 'GET',
    url: path,
    json: true,
            params: queryParameters,
    headers: headerParams
  };

  if (opt_extraHttpRequestParams) {
    httpRequestParams = angular.extend(httpRequestParams, opt_extraHttpRequestParams);
  }

  return (/** @type {?} */ (this.http_))(httpRequestParams);
}

/**
 * List all assets
 * Retrieves all assets.              :::info Our asset identifiers are aligned with the ISO 4217 currency codes standard only for fiat money (government or law regulated currency). :::              :::info Properties of the output are providing aggregated information from across all symbols related to the specific asset. If you need to calculate your aggregation (e.g., limiting only the particular type of symbols), you should use /v1/symbols endpoint as a data source. :::
 * @param {!string=} opt_filterAssetId Comma or semicolon delimited asset identifiers used to filter response. (optional, eg. &#x60;BTC;ETH&#x60;).
 * @param {!angular.$http.Config=} opt_extraHttpRequestParams Extra HTTP parameters to send.
 * @return {!angular.$q.Promise<!Array<!API.Client.v1.Asset>>}
 */
API.Client.MetadataApi.prototype.v1AssetsGet = function(opt_filterAssetId, opt_extraHttpRequestParams) {
  /** @const {string} */
  var path = this.basePath_ + '/v1/assets';

  /** @type {!Object} */
  var queryParameters = {};

  /** @type {!Object} */
  var headerParams = angular.extend({}, this.defaultHeaders_);
  if (opt_filterAssetId !== undefined) {
    queryParameters['filter_asset_id'] = opt_filterAssetId;
  }

  /** @type {!Object} */
  var httpRequestParams = {
    method: 'GET',
    url: path,
    json: true,
            params: queryParameters,
    headers: headerParams
  };

  if (opt_extraHttpRequestParams) {
    httpRequestParams = angular.extend(httpRequestParams, opt_extraHttpRequestParams);
  }

  return (/** @type {?} */ (this.http_))(httpRequestParams);
}

/**
 * List all asset icons
 * Gets the list of icons (of the given size) for all the assets.
 * @param {!number} size The size of the icons.
 * @param {!angular.$http.Config=} opt_extraHttpRequestParams Extra HTTP parameters to send.
 * @return {!angular.$q.Promise<!Array<!API.Client.v1.Icon>>}
 */
API.Client.MetadataApi.prototype.v1AssetsIconsSizeGet = function(size, opt_extraHttpRequestParams) {
  /** @const {string} */
  var path = this.basePath_ + '/v1/assets/icons/{size}'
      .replace('{' + 'size' + '}', String(size));

  /** @type {!Object} */
  var queryParameters = {};

  /** @type {!Object} */
  var headerParams = angular.extend({}, this.defaultHeaders_);
  // verify required parameter 'size' is set
  if (!size) {
    throw new Error('Missing required parameter size when calling v1AssetsIconsSizeGet');
  }
  /** @type {!Object} */
  var httpRequestParams = {
    method: 'GET',
    url: path,
    json: true,
            params: queryParameters,
    headers: headerParams
  };

  if (opt_extraHttpRequestParams) {
    httpRequestParams = angular.extend(httpRequestParams, opt_extraHttpRequestParams);
  }

  return (/** @type {?} */ (this.http_))(httpRequestParams);
}
