Class: Puavo::Client::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/puavo/client/base.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(subdomain, username, password, ssl = true) ⇒ Base

Returns a new instance of Base.



6
7
8
# File 'lib/puavo/client/base.rb', line 6

def initialize(subdomain, username, password, ssl = true)
  @subdomain, @username, @password, @ssl = subdomain, username, password, ssl
end

Instance Attribute Details

#passwordObject

Returns the value of attribute password.



4
5
6
# File 'lib/puavo/client/base.rb', line 4

def password
  @password
end

#sslObject

Returns the value of attribute ssl.



4
5
6
# File 'lib/puavo/client/base.rb', line 4

def ssl
  @ssl
end

#subdomainObject

Returns the value of attribute subdomain.



4
5
6
# File 'lib/puavo/client/base.rb', line 4

def subdomain
  @subdomain
end

#usernameObject

Returns the value of attribute username.



4
5
6
# File 'lib/puavo/client/base.rb', line 4

def username
  @username
end

Instance Method Details

#devicesObject



22
23
24
# File 'lib/puavo/client/base.rb', line 22

def devices
  Puavo::Client::API::Devices.new(subdomain, username, password, ssl)
end

#groupsObject



18
19
20
# File 'lib/puavo/client/base.rb', line 18

def groups
  Puavo::Client::API::Groups.new(subdomain, username, password, ssl)
end

#organisationObject



10
11
12
# File 'lib/puavo/client/base.rb', line 10

def organisation
  Puavo::Client::API::Organisation.new(subdomain, username, password, ssl)
end

#schoolsObject



14
15
16
# File 'lib/puavo/client/base.rb', line 14

def schools
  Puavo::Client::API::Schools.new(subdomain, username, password, ssl)
end

#usersObject



26
27
28
# File 'lib/puavo/client/base.rb', line 26

def users
  Puavo::Client::API::Users.new(subdomain, username, password, ssl)
end