Class: Rubino::API::Operations::OAuth::Connections::ListOperation
- Inherits:
-
Object
- Object
- Rubino::API::Operations::OAuth::Connections::ListOperation
- Defined in:
- lib/rubino/api/operations/oauth/connections/list_operation.rb
Overview
GET /v1/oauth/connections Lists stored OAuth connections through Serializer, which strips tokens and other secret fields before they leave the API.
Instance Method Summary collapse
- #call(_request) ⇒ Object
-
#initialize(repository: nil) ⇒ ListOperation
constructor
Accepts an alternate connection repository for tests.
Constructor Details
#initialize(repository: nil) ⇒ ListOperation
Accepts an alternate connection repository for tests.
13 14 15 |
# File 'lib/rubino/api/operations/oauth/connections/list_operation.rb', line 13 def initialize(repository: nil) @repository = repository end |
Instance Method Details
#call(_request) ⇒ Object
17 18 19 20 |
# File 'lib/rubino/api/operations/oauth/connections/list_operation.rb', line 17 def call(_request) connections = repository.list.map { |c| Serializer.call(c) } [200, connections] end |