=begin
#Exchange Rates Realtime 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
Generated by: https://openapi-generator.tech
Generator version: 7.14.0

=end

require 'cgi'

module OpenapiClient
  class MetadataApi
    attr_accessor :api_client

    def initialize(api_client = ApiClient.default)
      @api_client = api_client
    end
    # List all assets by asset ID
    # @param asset_id [String] The asset ID.
    # @param [Hash] opts the optional parameters
    # @return [Array<V1Asset>]
    def v1_assets_asset_id_get(asset_id, opts = {})
      data, _status_code, _headers = v1_assets_asset_id_get_with_http_info(asset_id, opts)
      data
    end

    # List all assets by asset ID
    # @param asset_id [String] The asset ID.
    # @param [Hash] opts the optional parameters
    # @return [Array<(Array<V1Asset>, Integer, Hash)>] Array<V1Asset> data, response status code and response headers
    def v1_assets_asset_id_get_with_http_info(asset_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: MetadataApi.v1_assets_asset_id_get ...'
      end
      # verify the required parameter 'asset_id' is set
      if @api_client.config.client_side_validation && asset_id.nil?
        fail ArgumentError, "Missing the required parameter 'asset_id' when calling MetadataApi.v1_assets_asset_id_get"
      end
      # resource path
      local_var_path = '/v1/assets/{asset_id}'.sub('{' + 'asset_id' + '}', CGI.escape(asset_id.to_s))

      # query parameters
      query_params = opts[:query_params] || {}

      # header parameters
      header_params = opts[:header_params] || {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json', 'application/x-msgpack']) unless header_params['Accept']

      # form parameters
      form_params = opts[:form_params] || {}

      # http body (model)
      post_body = opts[:debug_body]

      # return_type
      return_type = opts[:debug_return_type] || 'Array<V1Asset>'

      # auth_names
      auth_names = opts[:debug_auth_names] || ['APIKey', 'JWT']

      new_options = opts.merge(
        :operation => :"MetadataApi.v1_assets_asset_id_get",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )

      data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: MetadataApi#v1_assets_asset_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # 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 [Hash] opts the optional parameters
    # @option opts [String] :filter_asset_id Comma or semicolon delimited asset identifiers used to filter response. (optional, eg. &#x60;BTC;ETH&#x60;).
    # @return [Array<V1Asset>]
    def v1_assets_get(opts = {})
      data, _status_code, _headers = v1_assets_get_with_http_info(opts)
      data
    end

    # 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 [Hash] opts the optional parameters
    # @option opts [String] :filter_asset_id Comma or semicolon delimited asset identifiers used to filter response. (optional, eg. &#x60;BTC;ETH&#x60;).
    # @return [Array<(Array<V1Asset>, Integer, Hash)>] Array<V1Asset> data, response status code and response headers
    def v1_assets_get_with_http_info(opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: MetadataApi.v1_assets_get ...'
      end
      # resource path
      local_var_path = '/v1/assets'

      # query parameters
      query_params = opts[:query_params] || {}
      query_params[:'filter_asset_id'] = opts[:'filter_asset_id'] if !opts[:'filter_asset_id'].nil?

      # header parameters
      header_params = opts[:header_params] || {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json', 'application/x-msgpack']) unless header_params['Accept']

      # form parameters
      form_params = opts[:form_params] || {}

      # http body (model)
      post_body = opts[:debug_body]

      # return_type
      return_type = opts[:debug_return_type] || 'Array<V1Asset>'

      # auth_names
      auth_names = opts[:debug_auth_names] || ['APIKey', 'JWT']

      new_options = opts.merge(
        :operation => :"MetadataApi.v1_assets_get",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )

      data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: MetadataApi#v1_assets_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # List all asset icons
    # Gets the list of icons (of the given size) for all the assets.
    # @param size [Integer] The size of the icons.
    # @param [Hash] opts the optional parameters
    # @return [Array<V1Icon>]
    def v1_assets_icons_size_get(size, opts = {})
      data, _status_code, _headers = v1_assets_icons_size_get_with_http_info(size, opts)
      data
    end

    # List all asset icons
    # Gets the list of icons (of the given size) for all the assets.
    # @param size [Integer] The size of the icons.
    # @param [Hash] opts the optional parameters
    # @return [Array<(Array<V1Icon>, Integer, Hash)>] Array<V1Icon> data, response status code and response headers
    def v1_assets_icons_size_get_with_http_info(size, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: MetadataApi.v1_assets_icons_size_get ...'
      end
      # verify the required parameter 'size' is set
      if @api_client.config.client_side_validation && size.nil?
        fail ArgumentError, "Missing the required parameter 'size' when calling MetadataApi.v1_assets_icons_size_get"
      end
      # resource path
      local_var_path = '/v1/assets/icons/{size}'.sub('{' + 'size' + '}', CGI.escape(size.to_s))

      # query parameters
      query_params = opts[:query_params] || {}

      # header parameters
      header_params = opts[:header_params] || {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json', 'application/x-msgpack']) unless header_params['Accept']

      # form parameters
      form_params = opts[:form_params] || {}

      # http body (model)
      post_body = opts[:debug_body]

      # return_type
      return_type = opts[:debug_return_type] || 'Array<V1Icon>'

      # auth_names
      auth_names = opts[:debug_auth_names] || ['APIKey', 'JWT']

      new_options = opts.merge(
        :operation => :"MetadataApi.v1_assets_icons_size_get",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )

      data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: MetadataApi#v1_assets_icons_size_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
  end
end
