Class: Operto::Staff::Index
- Inherits:
-
Object
- Object
- Operto::Staff::Index
- Includes:
- Operation
- Defined in:
- lib/operto/staff/index.rb,
sig/operto.rbs
Constant Summary collapse
- DEFAULT_PAGE_SIZE =
100
Instance Method Summary collapse
Methods included from Operation
Instance Method Details
#call(skip: 0, take: DEFAULT_PAGE_SIZE) ⇒ ::Dry::Monads::Result[::Hash[::Symbol, untyped]]
9 10 11 12 13 14 15 |
# File 'lib/operto/staff/index.rb', line 9 def call(skip: 0, take: DEFAULT_PAGE_SIZE) query_params = build_query_params(skip, take) response = Operto::Client.connection.get('staff', query_params) Operto::Client.handle_response(response) { |body| format_results(body) } rescue StandardError => e Failure(e) end |