Class: Mcp::Tools::ApiService
- Inherits:
-
BaseService
- Object
- BaseService
- Mcp::Tools::ApiService
- Extended by:
- Gitlab::Utils::Override
- Defined in:
- app/services/mcp/tools/api_service.rb
Constant Summary
Constants inherited from BaseService
BaseService::UnauthorizedError
Instance Attribute Summary
Attributes inherited from BaseService
#current_user, #params, #project
Instance Method Summary collapse
- #execute(request: nil, params: nil) ⇒ Object
- #set_cred(current_user: nil, access_token: nil) ⇒ Object
Methods included from Gitlab::Utils::Override
extended, extensions, included, method_added, override, prepended, queue_verification, verify!
Methods inherited from BaseService
Methods included from BaseServiceUtility
#deny_visibility_level, #event_service, #log_error, #log_info, #notification_service, #system_hook_service, #todo_service, #visibility_level
Methods included from Gitlab::Allowable
Constructor Details
This class inherits a constructor from BaseService
Instance Method Details
#execute(request: nil, params: nil) ⇒ Object
14 15 16 17 18 19 20 |
# File 'app/services/mcp/tools/api_service.rb', line 14 def execute(request: nil, params: nil) if access_token.present? super else Response.error("ApiService: access token is not set") end end |
#set_cred(current_user: nil, access_token: nil) ⇒ Object
9 10 11 12 |
# File 'app/services/mcp/tools/api_service.rb', line 9 def set_cred(current_user: nil, access_token: nil) @access_token = access_token _ = current_user # current_user is not used in ApiService end |