=begin #Web API Swagger specification #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: 1.0 Generated by: https://github.com/swagger-api/swagger-codegen.git Swagger Codegen version: 2.3.0-SNAPSHOT =end require "uri" module GroupDocsPlatformCloud class AuthApi attr_accessor :api_client def initialize(api_client = ApiClient.default) @api_client = api_client end # Delete access token # # @param token Access Token # @param [Hash] opts the optional parameters # @return [File] def auth_delete_token(token, opts = {}) data, _status_code, _headers = auth_delete_token_with_http_info(token, opts) return data end # Delete access token # # @param token Access Token # @param [Hash] opts the optional parameters # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers def auth_delete_token_with_http_info(token, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AuthApi.auth_delete_token ..." end # verify the required parameter 'token' is set if @api_client.config.client_side_validation && token.nil? fail ArgumentError, "Missing the required parameter 'token' when calling AuthApi.auth_delete_token" end # resource path local_var_path = "/auth/token/{token}".sub('{' + 'token' + '}', 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(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'File') if @api_client.config.debugging @api_client.config.logger.debug "API called: AuthApi#auth_delete_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get access tokens # # @param [Hash] opts the optional parameters # @return [AccessTokenListResponse] def auth_get_tokens(opts = {}) data, _status_code, _headers = auth_get_tokens_with_http_info(opts) return data end # Get access tokens # # @param [Hash] opts the optional parameters # @return [Array<(AccessTokenListResponse, Fixnum, Hash)>] AccessTokenListResponse data, response status code and response headers def auth_get_tokens_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AuthApi.auth_get_tokens ..." end # resource path local_var_path = "/auth/token" # 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 => 'AccessTokenListResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: AuthApi#auth_get_tokens\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create access token # # @param [Hash] opts the optional parameters # @return [AccessTokenResponse] def auth_post_token(opts = {}) data, _status_code, _headers = auth_post_token_with_http_info(opts) return data end # Create access token # # @param [Hash] opts the optional parameters # @return [Array<(AccessTokenResponse, Fixnum, Hash)>] AccessTokenResponse data, response status code and response headers def auth_post_token_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AuthApi.auth_post_token ..." end # resource path local_var_path = "/auth/token" # 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(['multipart/form-data']) # form parameters form_params = {} # http body (model) post_body = nil 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 => 'AccessTokenResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: AuthApi#auth_post_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end end end