glip_sdk 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: aa6fdadf1797a32a45d0ead6b35d34d5af76a495
4
- data.tar.gz: f2d083c1d2a0ed3660ac25c61f36d932c7562178
3
+ metadata.gz: 39fe36f20b9679fe0be808b0bdcc0956539fe1c1
4
+ data.tar.gz: 7e520d28b9a5cee605acbed7aa436e343c3b4543
5
5
  SHA512:
6
- metadata.gz: e799c4f6534d554d105db0cc66a26c97c26b5bef8c1cdcfdff746cf5f4053e02aae4c880746f21cf64f87703298f142f07d53226369bfa4ccefb3948d9f88c23
7
- data.tar.gz: 67d0e063423dd4eb7973bf40d08d111711cb10fc34276fb429226a87f80d00845276b9abb553562d0fc8fb38e994e3f2148d5d448b2eb2d9d082c8e10bbea66e
6
+ metadata.gz: cfc192286f79c525fe39938df701a66e6207252326c6fda855acb4fcc2a985bea5ef569ff3437fa8fb1f0bd15a5cbc18d278c945d7405d2ef8172e4352ef7c31
7
+ data.tar.gz: 90bc5d7bf529b8d015fab991994f110cd91b828aed91bf8a5219ba83d27884e81f5dfc6a32ea50f5481e94ed0e7e911bfe9e4e137acc649416b0bd32906227c3
data/CHANGELOG.md CHANGED
@@ -1,5 +1,7 @@
1
1
  CHANGELOG
2
2
  ---------
3
+ - **2017-01-03**: 0.0.4
4
+ - Minor style update
3
5
  - **2017-01-01**: 0.0.3
4
6
  - Add get all groups
5
7
  - Support Ruby 2.4.0
data/README.md CHANGED
@@ -20,7 +20,25 @@ More documentation will be added soon. For now see the example and SDK code.
20
20
  ```ruby
21
21
  rc_sdk = RingCentralSdk::REST::Client.new [...]
22
22
  glip = GlipSdk::REST::Client.new rc_sdk
23
- res = glip.posts.post group_id: '12345', text: 'Hi there!'
23
+
24
+ # For HTTP calls, params are the same as REST API, e.g. camelCase
25
+ res = glip.posts.post groupId: '12345', text: 'Hi there!'
26
+
27
+ # Get all groups will successfully call `prevPageToken` as provided
28
+ # All params can be provided:
29
+ groups = glip.groups.all_groups
30
+ groups = glip.groups.all_groups type: 'Group'
31
+ groups = glip.groups.all_groups type: 'Team'
32
+
33
+ # Subscribe for updates
34
+ class MyObserver
35
+ def update(message)
36
+ puts 'received message'
37
+ end
38
+ end
39
+
40
+ glip.groups.observer MyObserver.new
41
+ glip.posts.observer MyObserver.new
24
42
  ```
25
43
 
26
44
  ## Example Scripts
@@ -24,7 +24,7 @@ module GlipSdk
24
24
  def all_groups(params = {})
25
25
  groups = []
26
26
  get_next = true
27
- while get_next == true
27
+ while get_next
28
28
  res = get params
29
29
  groups.concat(res.body['records']) if res.body['records'].length > 0
30
30
 
@@ -35,7 +35,7 @@ module GlipSdk
35
35
  get_next = false
36
36
  end
37
37
  end
38
- return groups
38
+ groups
39
39
  end
40
40
  end
41
41
  end
data/lib/glip_sdk.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module GlipSdk
2
- VERSION = '0.0.3'
2
+ VERSION = '0.0.4'
3
3
 
4
4
  autoload :REST, 'glip_sdk/rest'
5
5
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glip_sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Wang