Class: MistApi::Admins
- Inherits:
-
BaseController
- Object
- BaseController
- MistApi::Admins
- Defined in:
- lib/mist_api/controllers/admins.rb
Overview
Admins
Constant Summary
Constants inherited from BaseController
Instance Attribute Summary
Attributes inherited from BaseController
Instance Method Summary collapse
-
#verify_admin_invite(token) ⇒ ApiResponse
Note: another call to “‘GET /api/v1/self“` is required to see the new set of privileges.
Methods inherited from BaseController
#initialize, #new_parameter, #new_request_builder, #new_response_handler, user_agent
Constructor Details
This class inherits a constructor from MistApi::BaseController
Instance Method Details
#verify_admin_invite(token) ⇒ ApiResponse
Note: another call to “‘GET /api/v1/self“` is required to see the new set of privileges
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/mist_api/controllers/admins.rb', line 13 def verify_admin_invite(token) @api_call .request(new_request_builder(HttpMethodEnum::POST, '/api/v1/invite/verify/{token}', Server::API_HOST) .template_param(new_parameter(token, key: 'token') .should_encode(true)) .auth(Or.new('apiToken', 'basicAuth', And.new('basicAuth', 'csrfToken')))) .response(new_response_handler .is_nullify404(true) .is_response_void(true) .is_api_response(true) .local_error('400', 'Bad Syntax', APIException) .local_error('401', 'Unauthorized', APIException) .local_error('403', 'Permission Denied', APIException) .local_error('404', 'Not Found', APIException) .local_error('429', 'Too Many Request. The API Token used for the request reached'\ ' the 5000 API Calls per hour threshold', APIException)) .execute end |