Module: Agilix::Buzz::Commands::User

Included in:
Api
Defined in:
lib/agilix/buzz/commands/user.rb

Instance Method Summary collapse

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 = [])
  options = 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: options
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 = {})
  options = 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: options
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(options = {})
  options = argument_cleaner(required_params: %i( domainid ), optional_params: %i(includedescendantdomains persona startdate enddate byday bymonth byyear ), options: options)
  authenticated_get cmd: "getactiveusercount", **options
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(options = {})
  options = argument_cleaner(required_params: %i( domainid ), optional_params: %i( startdate enddate maxusers select ), options: options)
  authenticated_get cmd: "getdomainactivity", **options
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(options = {})
  options = argument_cleaner(required_params: %i( entityid ), optional_params: %i( default ), options: options)
  authenticated_get cmd: "getprofilepicture", **options
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(options = {})
  options = argument_cleaner(required_params: %i( userid ), optional_params: %i( select ), options: options)
  authenticated_get cmd: "getuser2", **options
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(options = {})
  options = argument_cleaner(required_params: %i( userid ), optional_params: %i( startdate enddate ), options: options)
  authenticated_get cmd: "getuseractivity", **options
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(options = {})
  options = argument_cleaner(required_params: %i( userid ), optional_params: %i( enrollmentid startkey limit types ), options: options)
  authenticated_get cmd: "getuseractivitystream", **options
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(options = {})
  options = argument_cleaner(required_params: %i( domainid ), optional_params: %i( includedescendantdomains limit show select text query ), options: options)
  authenticated_get cmd: "listusers", **options
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(options = {})
  options = argument_cleaner(required_params: %i( userid ), optional_params: %i( ), options: options)
  authenticated_get cmd: "restoreuser", **options
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)
  options = 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: options
end