Class: Ghub::Endpoints::Search::Users::Actions::Index
- Inherits:
-
Object
- Object
- Ghub::Endpoints::Search::Users::Actions::Index
- Includes:
- Pipeable
- Defined in:
- lib/ghub/endpoints/search/users/actions/index.rb
Overview
Handles a user index action.
Instance Method Summary collapse
Instance Method Details
#call(**parameters) ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'lib/ghub/endpoints/search/users/actions/index.rb', line 16 def call **parameters pipe( api.get("search/users", **parameters), try(:parse, catch: JSON::ParserError), validate(response, as: :to_h), as(:fetch, :items), map { |item| model.for(**item) } ) end |