Class: FjordBootCamp::Resources::Users
- Defined in:
- lib/fjord_boot_camp/resources/users.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#find(id) ⇒ Object
ユーザー詳細を取得.
-
#list(target: nil, company_id: nil, tag: nil, page: nil) ⇒ Object
ユーザー一覧を取得.
-
#mentors ⇒ Object
メンター一覧を取得.
-
#trainees ⇒ Object
研修生一覧を取得.
Methods inherited from Base
Constructor Details
This class inherits a constructor from FjordBootCamp::Resources::Base
Instance Method Details
#find(id) ⇒ Object
ユーザー詳細を取得
24 25 26 |
# File 'lib/fjord_boot_camp/resources/users.rb', line 24 def find(id) get("/api/users/#{id}") end |
#list(target: nil, company_id: nil, tag: nil, page: nil) ⇒ Object
ユーザー一覧を取得
13 14 15 16 17 18 19 20 |
# File 'lib/fjord_boot_camp/resources/users.rb', line 13 def list(target: nil, company_id: nil, tag: nil, page: nil) params = {} params[:target] = target if target params[:company_id] = company_id if company_id params[:tag] = tag if tag params[:page] = page if page get('/api/users', params) end |
#mentors ⇒ Object
メンター一覧を取得
34 35 36 |
# File 'lib/fjord_boot_camp/resources/users.rb', line 34 def mentors list(target: 'mentor') end |
#trainees ⇒ Object
研修生一覧を取得
29 30 31 |
# File 'lib/fjord_boot_camp/resources/users.rb', line 29 def trainees list(target: 'trainee') end |