Module: Agilix::Buzz::Commands::User
- Included in:
- Api
- Defined in:
- lib/agilix/buzz/commands/user.rb
Instance Method Summary collapse
-
#create_users2(items = []) ⇒ Object
(also: #create_users)
api.create_users [{ domainid: ‘57025’, username: “BuzzUserTest1”, email: ‘[email protected]’, password: ‘testpassword1234’, firstname: ‘Buzz’, lastname: “Man”, passwordquestion: “Who’s your best friend?”, passwordanswer: “Me”}].
-
#delete_users(items = {}) ⇒ Object
api.delete_users [userid: ‘57181’].
-
#get_active_user_count(options = {}) ⇒ Object
api.get_active_user_count domainid: ‘57025’ api.get_active_user_count domainid: ‘5’, includedescendantdomains: true, bymonth:true, startdate: ‘2018-01-01’, enddate: ‘2019-03-01’.
-
#get_domain_activity(options = {}) ⇒ Object
api.get_domain_activity domainid: ‘57025’.
-
#get_profile_picture(options = {}) ⇒ Object
api.get_profile_picture entityid: 57026 api.get_profile_picture entityid: 57025, default: “www.gravatar.com/avatar/00000000000000000000000000000000?d=mm”.
-
#get_user2(options = {}) ⇒ Object
(also: #get_user)
api.get_user2 userid: 57026.
-
#get_user_activity(options = {}) ⇒ Object
api.get_user_activity userid: 57026.
-
#get_user_activity_stream(options = {}) ⇒ Object
api.get_user_activity_stream userid: 57026.
-
#list_users(options = {}) ⇒ Object
api.list_users domainid: 57025.
-
#restore_user(options = {}) ⇒ Object
api.restore_user userid: 57026.
-
#update_users(items) ⇒ Object
api.update_users [{ userid: ‘57026’, username: “BuzzUserTestUpdated1”, email: ‘[email protected]’,firstname: ‘Buzz’, lastname: “ManUpdated”}].
Instance Method Details
#create_users2(items = []) ⇒ Object Also known as: create_users
api.create_users [{ domainid: ‘57025’, username: “BuzzUserTest1”, email: ‘[email protected]’, password: ‘testpassword1234’, firstname: ‘Buzz’, lastname: “Man”, passwordquestion: “Who’s your best friend?”, passwordanswer: “Me”}]
7 8 9 10 11 12 |
# File 'lib/agilix/buzz/commands/user.rb', line 7 def create_users2(items = []) = items.map do |item| argument_cleaner(required_params: %i( domainid username email password firstname lastname ), optional_params: %i( passwordquestion passwordanswer reference flags rights roleid data ), options: item ) end authenticated_bulk_post cmd: "createusers2", root_node: 'user', body: end |
#delete_users(items = {}) ⇒ Object
api.delete_users [userid: ‘57181’]
16 17 18 19 20 21 |
# File 'lib/agilix/buzz/commands/user.rb', line 16 def delete_users(items = {}) = items.map do |item| argument_cleaner(required_params: %i( userid ), optional_params: %i( ), options: item ) end authenticated_bulk_post cmd: "deleteusers", root_node: 'user', body: end |
#get_active_user_count(options = {}) ⇒ Object
api.get_active_user_count domainid: ‘57025’ api.get_active_user_count domainid: ‘5’, includedescendantdomains: true, bymonth:true, startdate: ‘2018-01-01’, enddate: ‘2019-03-01’
25 26 27 28 |
# File 'lib/agilix/buzz/commands/user.rb', line 25 def get_active_user_count( = {}) = argument_cleaner(required_params: %i( domainid ), optional_params: %i(includedescendantdomains persona startdate enddate byday bymonth byyear ), options: ) authenticated_get cmd: "getactiveusercount", ** end |
#get_domain_activity(options = {}) ⇒ Object
api.get_domain_activity domainid: ‘57025’
31 32 33 34 |
# File 'lib/agilix/buzz/commands/user.rb', line 31 def get_domain_activity( = {}) = argument_cleaner(required_params: %i( domainid ), optional_params: %i( startdate enddate maxusers select ), options: ) authenticated_get cmd: "getdomainactivity", ** end |
#get_profile_picture(options = {}) ⇒ Object
api.get_profile_picture entityid: 57026
api.get_profile_picture entityid: 57025, default: "https://www.gravatar.com/avatar/00000000000000000000000000000000?d=mm"
38 39 40 41 |
# File 'lib/agilix/buzz/commands/user.rb', line 38 def get_profile_picture( = {}) = argument_cleaner(required_params: %i( entityid ), optional_params: %i( default ), options: ) authenticated_get cmd: "getprofilepicture", ** end |
#get_user2(options = {}) ⇒ Object Also known as: get_user
api.get_user2 userid: 57026
44 45 46 47 |
# File 'lib/agilix/buzz/commands/user.rb', line 44 def get_user2( = {}) = argument_cleaner(required_params: %i( userid ), optional_params: %i( select ), options: ) authenticated_get cmd: "getuser2", ** end |
#get_user_activity(options = {}) ⇒ Object
api.get_user_activity userid: 57026
51 52 53 54 |
# File 'lib/agilix/buzz/commands/user.rb', line 51 def get_user_activity( = {}) = argument_cleaner(required_params: %i( userid ), optional_params: %i( startdate enddate ), options: ) authenticated_get cmd: "getuseractivity", ** end |
#get_user_activity_stream(options = {}) ⇒ Object
api.get_user_activity_stream userid: 57026
57 58 59 60 |
# File 'lib/agilix/buzz/commands/user.rb', line 57 def get_user_activity_stream( = {}) = argument_cleaner(required_params: %i( userid ), optional_params: %i( enrollmentid startkey limit types ), options: ) authenticated_get cmd: "getuseractivitystream", ** end |
#list_users(options = {}) ⇒ Object
api.list_users domainid: 57025
63 64 65 66 |
# File 'lib/agilix/buzz/commands/user.rb', line 63 def list_users( = {}) = argument_cleaner(required_params: %i( domainid ), optional_params: %i( includedescendantdomains limit show select text query ), options: ) authenticated_get cmd: "listusers", ** end |
#restore_user(options = {}) ⇒ Object
api.restore_user userid: 57026
69 70 71 72 |
# File 'lib/agilix/buzz/commands/user.rb', line 69 def restore_user( = {}) = argument_cleaner(required_params: %i( userid ), optional_params: %i( ), options: ) authenticated_get cmd: "restoreuser", ** end |
#update_users(items) ⇒ Object
api.update_users [{ userid: ‘57026’, username: “BuzzUserTestUpdated1”, email: ‘[email protected]’,firstname: ‘Buzz’, lastname: “ManUpdated”}]
75 76 77 78 79 80 |
# File 'lib/agilix/buzz/commands/user.rb', line 75 def update_users(items) = items.map do |item| argument_cleaner(required_params: %i( userid ), optional_params: %i( domainid username firstname lastname email reference flags data ), options: item) end authenticated_bulk_post cmd: "updateusers", root_node: 'user', body: end |