Module: Agilix::Buzz::Commands::Domain

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

Instance Method Summary collapse

Instance Method Details

#create_domains(items = []) ⇒ Object

api.create_domains [“BuzzTest1”, userspace: ‘buzz-test-fc-1’, parentid: ‘57025’]



7
8
9
10
11
12
# File 'lib/agilix/buzz/commands/domain.rb', line 7

def create_domains(items = [])
  options = items.map do |item|
    argument_cleaner(required_params: %i( name userspace parentid ), optional_params: %i( reference flags data ), options: item )
  end
  authenticated_bulk_post cmd: "createdomains", root_node: 'domain', body: options
end

#delete_domain(options = {}) ⇒ Object

api.delete_domain domainid: ‘57031’



15
16
17
18
# File 'lib/agilix/buzz/commands/domain.rb', line 15

def delete_domain(options = {})
  options = argument_cleaner(required_params: %i( domainid ), optional_params: %i( ), options: options )
  authenticated_get cmd: "deletedomain", **options
end

#get_domain2(options = {}) ⇒ Object Also known as: get_domain

api.get_domain domainid: ‘57025’



21
22
23
24
# File 'lib/agilix/buzz/commands/domain.rb', line 21

def get_domain2(options = {})
  options = argument_cleaner(required_params: %i( domainid ), optional_params: %i( select ), options: options )
  authenticated_get cmd: "getdomain2", **options
end

#get_domain_content(options = {}) ⇒ Object

api.get_domain_content domainid: ‘57025’



28
29
30
31
# File 'lib/agilix/buzz/commands/domain.rb', line 28

def get_domain_content(options = {})
  options = argument_cleaner(required_params: %i( domainid ), optional_params: %i( ), options: options )
  authenticated_get cmd: "getdomaincontent", **options
end

#get_domain_enrollment_metrics(options = {}) ⇒ Object

api.get_domain_enrollment_metrics domainid: ‘57025’



34
35
36
37
# File 'lib/agilix/buzz/commands/domain.rb', line 34

def get_domain_enrollment_metrics(options = {})
  options = argument_cleaner(required_params: %i( domainid ), optional_params: %i( skipempty ), options: options )
  authenticated_get cmd: "getdomainenrollmentmetrics", **options
end

#get_domain_parent_list(options = {}) ⇒ Object

api.get_domain_parent_list domainid: ‘57025’



40
41
42
43
# File 'lib/agilix/buzz/commands/domain.rb', line 40

def get_domain_parent_list(options = {})
  options = argument_cleaner(required_params: %i( domainid ), optional_params: %i( ), options: options )
  authenticated_get cmd: "getdomainparentlist", **options
end

#get_domain_settings(options = {}) ⇒ Object

api.get_domain_settings domainid: ‘57025’, path: “AgilixBuzzSettings.xml”



46
47
48
49
# File 'lib/agilix/buzz/commands/domain.rb', line 46

def get_domain_settings(options = {})
  options = argument_cleaner(required_params: %i( domainid path ), optional_params: %i( includesource ), options: options )
  authenticated_get cmd: "getdomainsettings", **options
end

#get_domain_stats(options = {}) ⇒ Object

api.get_domain_stats domainid: ‘57025’, options: “users|courses”



53
54
55
56
57
58
# File 'lib/agilix/buzz/commands/domain.rb', line 53

def get_domain_stats(options = {})
  # options = 'users|courses|activecourses|sections|enrollments|activeenrollments|activestudents'
  options = argument_cleaner(required_params: %i( domainid options ), optional_params: %i( includesource ), options: options )

  authenticated_get cmd: "getdomainstats", **options
end

#list_domains(options = {}) ⇒ Object

api.list_domains domainid: ‘0’ # all domains for user api.list_domains domainid: ‘57025’



62
63
64
65
66
# File 'lib/agilix/buzz/commands/domain.rb', line 62

def list_domains(options = {})
  options[:domainid] ||= 0
  options = argument_cleaner(required_params: %i( domainid  ), optional_params: %i( includedescendantdomains limit show select text query ), options: options )
  authenticated_get cmd: "listdomains", **options
end

#restore_domain(options = {}) ⇒ Object

api.restore_domain domainid: ‘57031’



69
70
71
72
# File 'lib/agilix/buzz/commands/domain.rb', line 69

def restore_domain(options = {})
  options = argument_cleaner(required_params: %i( domainid ), optional_params: %i( ), options: options )
  authenticated_get cmd: "restoredomain", **options
end

#update_domains(items) ⇒ Object

api.update_domains [{ domainid: “57031”, name: “BuzzTestUpdated1”, userspace: ‘buzz-test-fc-1’, parentid: ‘57025’}]



75
76
77
78
79
80
# File 'lib/agilix/buzz/commands/domain.rb', line 75

def update_domains(items)
  options = items.map do |item|
    argument_cleaner(required_params: %i( domainid  ), optional_params: %i( name userspace parentid reference flags data ), options: item )
  end
  authenticated_bulk_post cmd: "updatedomains", root_node: 'domain', body: options
end