Class: GlipSdk::REST::Client
- Inherits:
-
Object
- Object
- GlipSdk::REST::Client
- Defined in:
- lib/glip_sdk/rest/client.rb
Instance Attribute Summary collapse
-
#api ⇒ Object
Returns the value of attribute api.
-
#groups ⇒ Object
Returns the value of attribute groups.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#persons ⇒ Object
Returns the value of attribute persons.
-
#posts ⇒ Object
Returns the value of attribute posts.
Instance Method Summary collapse
-
#initialize(rc_sdk) ⇒ Client
constructor
A new instance of Client.
- #load_groups ⇒ Object
Constructor Details
#initialize(rc_sdk) ⇒ Client
Returns a new instance of Client.
10 11 12 13 14 15 16 |
# File 'lib/glip_sdk/rest/client.rb', line 10 def initialize(rc_sdk) @api = rc_sdk @logger = @api.config.logger @groups = GlipSdk::REST::Groups.new @api @persons = GlipSdk::REST::Persons.new @api @posts = GlipSdk::REST::Posts.new @api end |
Instance Attribute Details
#api ⇒ Object
Returns the value of attribute api.
4 5 6 |
# File 'lib/glip_sdk/rest/client.rb', line 4 def api @api end |
#groups ⇒ Object
Returns the value of attribute groups.
6 7 8 |
# File 'lib/glip_sdk/rest/client.rb', line 6 def groups @groups end |
#logger ⇒ Object
Returns the value of attribute logger.
5 6 7 |
# File 'lib/glip_sdk/rest/client.rb', line 5 def logger @logger end |
#persons ⇒ Object
Returns the value of attribute persons.
7 8 9 |
# File 'lib/glip_sdk/rest/client.rb', line 7 def persons @persons end |
#posts ⇒ Object
Returns the value of attribute posts.
8 9 10 |
# File 'lib/glip_sdk/rest/client.rb', line 8 def posts @posts end |
Instance Method Details
#load_groups ⇒ Object
18 19 20 21 22 |
# File 'lib/glip_sdk/rest/client.rb', line 18 def load_groups res = @groups.get.http.get 'glip/groups' @groups_cache = GlipSdk::REST::Cache::Groups.new @groups.load_groups(res.body['records']) end |