Class: FolioClient::Users
- Inherits:
-
Object
- Object
- FolioClient::Users
- Defined in:
- lib/folio_client/users.rb
Overview
Query user records in Folio; see s3.amazonaws.com/foliodocs/api/mod-users/r/users.html
Instance Method Summary collapse
- #fetch_list(query: nil, limit: 10_000, offset: 0, lang: 'en') ⇒ Object
- #fetch_user_details(id:, lang: 'en') ⇒ Object
Instance Method Details
#fetch_list(query: nil, limit: 10_000, offset: 0, lang: 'en') ⇒ Object
11 12 13 14 15 |
# File 'lib/folio_client/users.rb', line 11 def fetch_list(query: nil, limit: 10_000, offset: 0, lang: 'en') params = { limit: limit, offset: offset, lang: lang } params[:query] = query if query client.get('/users', params) end |
#fetch_user_details(id:, lang: 'en') ⇒ Object
19 20 21 22 23 |
# File 'lib/folio_client/users.rb', line 19 def fetch_user_details(id:, lang: 'en') client.get("/users/#{id}", { lang: lang }) end |