Class: DocFox::User::ListService
- Inherits:
-
BaseService
- Object
- BaseService
- DocFox::User::ListService
- Includes:
- Enumerable
- Defined in:
- lib/doc_fox/user/list_service.rb
Instance Method Summary collapse
-
#initialize(page: 1, per_page: Float::INFINITY) ⇒ ListService
constructor
List users.
Methods included from Enumerable
Constructor Details
#initialize(page: 1, per_page: Float::INFINITY) ⇒ ListService
List users.
https://www.docfoxapp.com/api/v2/documentation#tag/Users/paths/~1api~1v2~1users/get
Examples
service = DocFox::User::ListService.call.first
service.id
service.email
If you don't provide the per_page argument, multiple API requests will be made untill all records have been
returned. You could be rate limited, so use wisely.
DocFox::User::ListService.call(page: 1, per_page: 10).map { _1 }
GET /api/v2/users
22 23 24 25 26 27 28 29 |
# File 'lib/doc_fox/user/list_service.rb', line 22 def initialize(page: 1, per_page: Float::INFINITY) super( path: 'users', facade_klass: DocFox::User::Facade, page: page, per_page: per_page ) end |