Module: RubyLokaliseApi::Rest::TeamUsers
- Included in:
- RubyLokaliseApi::Rest
- Defined in:
- lib/ruby_lokalise_api/rest/team_users.rb
Instance Method Summary collapse
-
#destroy_team_user(team_id, user_id) ⇒ RubyLokaliseApi::Generics::DeletedResource
Deletes a team user.
-
#team_user(team_id, user_id) ⇒ RubyLokaliseApi::Resources::TeamUser
Returns a single team user.
-
#team_users(team_id, req_params = {}) ⇒ RubyLokaliseApi::Collections::TeamUsers
Returns team users.
-
#update_team_user(team_id, user_id, req_params = {}) ⇒ RubyLokaliseApi::Resources::TeamUser
Updates a team user.
Instance Method Details
#destroy_team_user(team_id, user_id) ⇒ RubyLokaliseApi::Generics::DeletedResource
Deletes a team user
56 57 58 59 60 61 62 |
# File 'lib/ruby_lokalise_api/rest/team_users.rb', line 56 def destroy_team_user(team_id, user_id) params = { query: [team_id, user_id] } data = endpoint(name: 'TeamUsers', params: params).do_delete RubyLokaliseApi::Generics::DeletedResource.new data.content end |
#team_user(team_id, user_id) ⇒ RubyLokaliseApi::Resources::TeamUser
Returns a single team user
27 28 29 30 31 32 33 |
# File 'lib/ruby_lokalise_api/rest/team_users.rb', line 27 def team_user(team_id, user_id) params = { query: [team_id, user_id] } response = endpoint(name: 'TeamUsers', params: params).do_get resource 'TeamUser', response end |
#team_users(team_id, req_params = {}) ⇒ RubyLokaliseApi::Collections::TeamUsers
Returns team users
12 13 14 15 16 17 18 19 |
# File 'lib/ruby_lokalise_api/rest/team_users.rb', line 12 def team_users(team_id, req_params = {}) name = 'TeamUsers' params = { query: team_id, req: req_params } data = endpoint(name: name, params: params).do_get collection name, data end |
#update_team_user(team_id, user_id, req_params = {}) ⇒ RubyLokaliseApi::Resources::TeamUser
Updates a team user
42 43 44 45 46 47 48 |
# File 'lib/ruby_lokalise_api/rest/team_users.rb', line 42 def update_team_user(team_id, user_id, req_params = {}) params = { query: [team_id, user_id], req: req_params } data = endpoint(name: 'TeamUsers', params: params).do_put resource 'TeamUser', data end |