class Appmarketapi::AppMarketAPIApi

Attributes

api_client[RW]

Public Class Methods

new(api_client = ApiClient.default) click to toggle source
# File lib/appmarketapi-rest/api/app_market_api_api.rb, line 19
def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Public Instance Methods

authorize_application(application_id, body, opts = {}) click to toggle source

@param application_id @param body @param [Hash] opts the optional parameters @return [AppmarketapiAuthorizeApplicationResponse]

# File lib/appmarketapi-rest/api/app_market_api_api.rb, line 26
def authorize_application(application_id, body, opts = {})
  data, _status_code, _headers = authorize_application_with_http_info(application_id, body, opts)
  data
end
authorize_application_with_http_info(application_id, body, opts = {}) click to toggle source

@param application_id @param body @param [Hash] opts the optional parameters @return [Array<(AppmarketapiAuthorizeApplicationResponse, Fixnum, Hash)>] AppmarketapiAuthorizeApplicationResponse data, response status code and response headers

# File lib/appmarketapi-rest/api/app_market_api_api.rb, line 35
def authorize_application_with_http_info(application_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AppMarketAPIApi.authorize_application ...'
  end
  # verify the required parameter 'application_id' is set
  if @api_client.config.client_side_validation && application_id.nil?
    fail ArgumentError, "Missing the required parameter 'application_id' when calling AppMarketAPIApi.authorize_application"
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling AppMarketAPIApi.authorize_application"
  end
  # resource path
  local_var_path = '/v1/applications/{application_id}/authorize'.sub('{' + 'application_id' + '}', application_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  auth_names = []
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AppmarketapiAuthorizeApplicationResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AppMarketAPIApi#authorize_application\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
create_application(body, opts = {}) click to toggle source

@param body @param [Hash] opts the optional parameters @return [AppmarketapiCreateApplicationResponse]

# File lib/appmarketapi-rest/api/app_market_api_api.rb, line 81
def create_application(body, opts = {})
  data, _status_code, _headers = create_application_with_http_info(body, opts)
  data
end
create_application_with_http_info(body, opts = {}) click to toggle source

@param body @param [Hash] opts the optional parameters @return [Array<(AppmarketapiCreateApplicationResponse, Fixnum, Hash)>] AppmarketapiCreateApplicationResponse data, response status code and response headers

# File lib/appmarketapi-rest/api/app_market_api_api.rb, line 89
def create_application_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AppMarketAPIApi.create_application ...'
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling AppMarketAPIApi.create_application"
  end
  # resource path
  local_var_path = '/v1/applications'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  auth_names = []
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AppmarketapiCreateApplicationResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AppMarketAPIApi#create_application\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
create_developer(body, opts = {}) click to toggle source

@param body @param [Hash] opts the optional parameters @return [AppmarketapiCreateDeveloperResponse]

# File lib/appmarketapi-rest/api/app_market_api_api.rb, line 131
def create_developer(body, opts = {})
  data, _status_code, _headers = create_developer_with_http_info(body, opts)
  data
end
create_developer_with_http_info(body, opts = {}) click to toggle source

@param body @param [Hash] opts the optional parameters @return [Array<(AppmarketapiCreateDeveloperResponse, Fixnum, Hash)>] AppmarketapiCreateDeveloperResponse data, response status code and response headers

# File lib/appmarketapi-rest/api/app_market_api_api.rb, line 139
def create_developer_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AppMarketAPIApi.create_developer ...'
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling AppMarketAPIApi.create_developer"
  end
  # resource path
  local_var_path = '/v1/developers'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  auth_names = []
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AppmarketapiCreateDeveloperResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AppMarketAPIApi#create_developer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
deauthorize_application(application_id, body, opts = {}) click to toggle source

@param application_id @param body @param [Hash] opts the optional parameters @return [AppmarketapiDeauthorizeApplicationResponse]

# File lib/appmarketapi-rest/api/app_market_api_api.rb, line 182
def deauthorize_application(application_id, body, opts = {})
  data, _status_code, _headers = deauthorize_application_with_http_info(application_id, body, opts)
  data
end
deauthorize_application_with_http_info(application_id, body, opts = {}) click to toggle source

@param application_id @param body @param [Hash] opts the optional parameters @return [Array<(AppmarketapiDeauthorizeApplicationResponse, Fixnum, Hash)>] AppmarketapiDeauthorizeApplicationResponse data, response status code and response headers

# File lib/appmarketapi-rest/api/app_market_api_api.rb, line 191
def deauthorize_application_with_http_info(application_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AppMarketAPIApi.deauthorize_application ...'
  end
  # verify the required parameter 'application_id' is set
  if @api_client.config.client_side_validation && application_id.nil?
    fail ArgumentError, "Missing the required parameter 'application_id' when calling AppMarketAPIApi.deauthorize_application"
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling AppMarketAPIApi.deauthorize_application"
  end
  # resource path
  local_var_path = '/v1/applications/{application_id}/deauthorize'.sub('{' + 'application_id' + '}', application_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  auth_names = []
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AppmarketapiDeauthorizeApplicationResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AppMarketAPIApi#deauthorize_application\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_application(application_id, opts = {}) click to toggle source

@param application_id @param [Hash] opts the optional parameters @option opts [String] :user_id @option opts [String] :user_token @return [AppmarketapiGetApplicationResponse]

# File lib/appmarketapi-rest/api/app_market_api_api.rb, line 239
def get_application(application_id, opts = {})
  data, _status_code, _headers = get_application_with_http_info(application_id, opts)
  data
end
get_application_id(access_token, opts = {}) click to toggle source

@param access_token @param [Hash] opts the optional parameters @return [AppmarketapiGetApplicationIdResponse]

# File lib/appmarketapi-rest/api/app_market_api_api.rb, line 293
def get_application_id(access_token, opts = {})
  data, _status_code, _headers = get_application_id_with_http_info(access_token, opts)
  data
end
get_application_id_with_http_info(access_token, opts = {}) click to toggle source

@param access_token @param [Hash] opts the optional parameters @return [Array<(AppmarketapiGetApplicationIdResponse, Fixnum, Hash)>] AppmarketapiGetApplicationIdResponse data, response status code and response headers

# File lib/appmarketapi-rest/api/app_market_api_api.rb, line 301
def get_application_id_with_http_info(access_token, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AppMarketAPIApi.get_application_id ...'
  end
  # verify the required parameter 'access_token' is set
  if @api_client.config.client_side_validation && access_token.nil?
    fail ArgumentError, "Missing the required parameter 'access_token' when calling AppMarketAPIApi.get_application_id"
  end
  # resource path
  local_var_path = '/v1/application/oauth2/{access_token}'.sub('{' + 'access_token' + '}', access_token.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AppmarketapiGetApplicationIdResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AppMarketAPIApi#get_application_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_application_with_http_info(application_id, opts = {}) click to toggle source

@param application_id @param [Hash] opts the optional parameters @option opts [String] :user_id @option opts [String] :user_token @return [Array<(AppmarketapiGetApplicationResponse, Fixnum, Hash)>] AppmarketapiGetApplicationResponse data, response status code and response headers

# File lib/appmarketapi-rest/api/app_market_api_api.rb, line 249
def get_application_with_http_info(application_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AppMarketAPIApi.get_application ...'
  end
  # verify the required parameter 'application_id' is set
  if @api_client.config.client_side_validation && application_id.nil?
    fail ArgumentError, "Missing the required parameter 'application_id' when calling AppMarketAPIApi.get_application"
  end
  # resource path
  local_var_path = '/v1/applications/{application_id}'.sub('{' + 'application_id' + '}', application_id.to_s)

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

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AppmarketapiGetApplicationResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AppMarketAPIApi#get_application\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_applications(opts = {}) click to toggle source

@param [Hash] opts the optional parameters @option opts [String] :user_id @option opts [String] :user_token @option opts [Integer] :top_rated_limit @return [AppmarketapiGetApplicationsResponse]

# File lib/appmarketapi-rest/api/app_market_api_api.rb, line 345
def get_applications(opts = {})
  data, _status_code, _headers = get_applications_with_http_info(opts)
  data
end
get_applications_with_http_info(opts = {}) click to toggle source

@param [Hash] opts the optional parameters @option opts [String] :user_id @option opts [String] :user_token @option opts [Integer] :top_rated_limit @return [Array<(AppmarketapiGetApplicationsResponse, Fixnum, Hash)>] AppmarketapiGetApplicationsResponse data, response status code and response headers

# File lib/appmarketapi-rest/api/app_market_api_api.rb, line 355
def get_applications_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AppMarketAPIApi.get_applications ...'
  end
  # resource path
  local_var_path = '/v1/applications'

  # query parameters
  query_params = {}
  query_params[:'user_id'] = opts[:'user_id'] if !opts[:'user_id'].nil?
  query_params[:'user_token'] = opts[:'user_token'] if !opts[:'user_token'].nil?
  query_params[:'top_rated_limit'] = opts[:'top_rated_limit'] if !opts[:'top_rated_limit'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AppmarketapiGetApplicationsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AppMarketAPIApi#get_applications\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
update_application(application_id, body, opts = {}) click to toggle source

@param application_id @param body @param [Hash] opts the optional parameters @return [AppmarketapiUpdateApplicationResponse]

# File lib/appmarketapi-rest/api/app_market_api_api.rb, line 397
def update_application(application_id, body, opts = {})
  data, _status_code, _headers = update_application_with_http_info(application_id, body, opts)
  data
end
update_application_with_http_info(application_id, body, opts = {}) click to toggle source

@param application_id @param body @param [Hash] opts the optional parameters @return [Array<(AppmarketapiUpdateApplicationResponse, Fixnum, Hash)>] AppmarketapiUpdateApplicationResponse data, response status code and response headers

# File lib/appmarketapi-rest/api/app_market_api_api.rb, line 406
def update_application_with_http_info(application_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AppMarketAPIApi.update_application ...'
  end
  # verify the required parameter 'application_id' is set
  if @api_client.config.client_side_validation && application_id.nil?
    fail ArgumentError, "Missing the required parameter 'application_id' when calling AppMarketAPIApi.update_application"
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling AppMarketAPIApi.update_application"
  end
  # resource path
  local_var_path = '/v1/applications/{application_id}'.sub('{' + 'application_id' + '}', application_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  auth_names = []
  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AppmarketapiUpdateApplicationResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AppMarketAPIApi#update_application\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end