Module: RedmineAPIHelper::UsersAPIHelper
- Included in:
- Helpers
- Defined in:
- lib/redmine_api_helper/users_api_helper.rb
Instance Method Summary collapse
-
#create_user(**params) ⇒ Object
creates a new user with params, corresponds to controller#create.
-
#destroy_user(id, **params) ⇒ Object
deletes an existing user with params, corresponds to controller#destroy.
-
#list_users(**params) ⇒ Object
lists users, corresponds to controller#index.
-
#read_user(id, **params) ⇒ Object
reads user having id, corresponds to controller#show.
-
#update_user(id, **params) ⇒ Object
updates an existing user with params, corresponds to controller#update.
-
#user_url(id, **params) ⇒ Object
crerate user_url.
-
#users_url(**params) ⇒ Object
reads users_url from args.
Instance Method Details
#create_user(**params) ⇒ Object
creates a new user with params, corresponds to controller#create
54 55 56 |
# File 'lib/redmine_api_helper/users_api_helper.rb', line 54 def create_user(**params) create_object(:user, params) end |
#destroy_user(id, **params) ⇒ Object
deletes an existing user with params, corresponds to controller#destroy
68 69 70 |
# File 'lib/redmine_api_helper/users_api_helper.rb', line 68 def destroy_user(id, **params) destroy_object(:user, id, params) end |
#list_users(**params) ⇒ Object
lists users, corresponds to controller#index
40 41 42 |
# File 'lib/redmine_api_helper/users_api_helper.rb', line 40 def list_users(**params) list_objects(:users, params) end |
#read_user(id, **params) ⇒ Object
reads user having id, corresponds to controller#show
47 48 49 |
# File 'lib/redmine_api_helper/users_api_helper.rb', line 47 def read_user(id, **params) read_object(:user, id, params) end |
#update_user(id, **params) ⇒ Object
updates an existing user with params, corresponds to controller#update
61 62 63 |
# File 'lib/redmine_api_helper/users_api_helper.rb', line 61 def update_user(id, **params) update_object(:user, id, params) end |
#user_url(id, **params) ⇒ Object
crerate user_url
33 34 35 |
# File 'lib/redmine_api_helper/users_api_helper.rb', line 33 def user_url(id, **params) url_path(users_url, id, **params) end |
#users_url(**params) ⇒ Object
reads users_url from args
26 27 28 |
# File 'lib/redmine_api_helper/users_api_helper.rb', line 26 def users_url(**params) url_path(args.urls.Home, "users", params) end |