Class: ArtikCloud::TokensApi
- Inherits:
-
Object
- Object
- ArtikCloud::TokensApi
- Defined in:
- lib/artikcloud/api/tokens_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#check_token(token_info, opts = {}) ⇒ CheckTokenResponse
Check Token (Deprecated) Check Token.
-
#check_token_with_http_info(token_info, opts = {}) ⇒ Array<(CheckTokenResponse, Fixnum, Hash)>
Check Token (Deprecated) Check Token.
-
#initialize(api_client = ApiClient.default) ⇒ TokensApi
constructor
A new instance of TokensApi.
-
#refresh_token(grant_type, refresh_token, opts = {}) ⇒ RefreshTokenResponse
Refresh Token Refresh Token.
-
#refresh_token_with_http_info(grant_type, refresh_token, opts = {}) ⇒ Array<(RefreshTokenResponse, Fixnum, Hash)>
Refresh Token Refresh Token.
-
#token_info(opts = {}) ⇒ TokenInfoSuccessResponse
Token Info Returns the Token Information.
-
#token_info_with_http_info(opts = {}) ⇒ Array<(TokenInfoSuccessResponse, Fixnum, Hash)>
Token Info Returns the Token Information.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
16 17 18 |
# File 'lib/artikcloud/api/tokens_api.rb', line 16 def api_client @api_client end |
Instance Method Details
#check_token(token_info, opts = {}) ⇒ CheckTokenResponse
Check Token (Deprecated) Check Token. See tokenInfo
27 28 29 30 |
# File 'lib/artikcloud/api/tokens_api.rb', line 27 def check_token(token_info, opts = {}) data, _status_code, _headers = check_token_with_http_info(token_info, opts) return data end |
#check_token_with_http_info(token_info, opts = {}) ⇒ Array<(CheckTokenResponse, Fixnum, Hash)>
Check Token (Deprecated) Check Token. See tokenInfo
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/artikcloud/api/tokens_api.rb', line 37 def check_token_with_http_info(token_info, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: TokensApi.check_token ..." end # verify the required parameter 'token_info' is set fail ArgumentError, "Missing the required parameter 'token_info' when calling TokensApi.check_token" if token_info.nil? # resource path local_var_path = "/accounts/checkToken".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(token_info) auth_names = ['artikcloud_oauth'] 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 => 'CheckTokenResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: TokensApi#check_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#refresh_token(grant_type, refresh_token, opts = {}) ⇒ RefreshTokenResponse
Refresh Token Refresh Token
79 80 81 82 |
# File 'lib/artikcloud/api/tokens_api.rb', line 79 def refresh_token(grant_type, refresh_token, opts = {}) data, _status_code, _headers = refresh_token_with_http_info(grant_type, refresh_token, opts) return data end |
#refresh_token_with_http_info(grant_type, refresh_token, opts = {}) ⇒ Array<(RefreshTokenResponse, Fixnum, Hash)>
Refresh Token Refresh Token
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 |
# File 'lib/artikcloud/api/tokens_api.rb', line 90 def refresh_token_with_http_info(grant_type, refresh_token, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: TokensApi.refresh_token ..." end # verify the required parameter 'grant_type' is set fail ArgumentError, "Missing the required parameter 'grant_type' when calling TokensApi.refresh_token" if grant_type.nil? # verify the required parameter 'refresh_token' is set fail ArgumentError, "Missing the required parameter 'refresh_token' when calling TokensApi.refresh_token" if refresh_token.nil? # resource path local_var_path = "/accounts/token".sub('{format}','json') # 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/x-www-form-urlencoded']) # form parameters form_params = {} form_params["grant_type"] = grant_type form_params["refresh_token"] = refresh_token # http body (model) post_body = nil auth_names = ['artikcloud_oauth'] 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 => 'RefreshTokenResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: TokensApi#refresh_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#token_info(opts = {}) ⇒ TokenInfoSuccessResponse
Token Info Returns the Token Information
136 137 138 139 |
# File 'lib/artikcloud/api/tokens_api.rb', line 136 def token_info(opts = {}) data, _status_code, _headers = token_info_with_http_info(opts) return data end |
#token_info_with_http_info(opts = {}) ⇒ Array<(TokenInfoSuccessResponse, Fixnum, Hash)>
Token Info Returns the Token Information
145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 |
# File 'lib/artikcloud/api/tokens_api.rb', line 145 def token_info_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: TokensApi.token_info ..." end # resource path local_var_path = "/accounts/tokenInfo".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['artikcloud_oauth'] 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 => 'TokenInfoSuccessResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: TokensApi#token_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |