ringcentral-sdk 0.8.0 → 0.8.1

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: 3c1efd66d148fda73c9456db84fed863929255ff
4
- data.tar.gz: 9db5a0605d4c492dc71861dd2833cf63be7c8e75
3
+ metadata.gz: 61f23b60292f484d9584097099c11c1a7b6c70f8
4
+ data.tar.gz: 3387fe6b72c09a0d1c512ce75691ac8616015d02
5
5
  SHA512:
6
- metadata.gz: b80dbeba5012b748511992af0f40d3185da617adf0fbc032d536bc815f6f620d509d8b10bce9643ee27ccc84bc1e1ae16ce9eeb3bbaf5acaa364f61775b34097
7
- data.tar.gz: 930712411fe37f3f9fc974fbf73c0a4e8e3e95b28d70abbd0d3676d04b313e849e06fa21f8a4b1736a0fd4b0115914758bfd4ad9f3be842f1fbbe6d18f7041cd
6
+ metadata.gz: aa32028df6faf6bf68834e23b052f9470e06ad7f9233c4d98ffe217bb9a6b26db50d5d10c17d543ae67fbbc8102d460dbfc6e1123b59ea7e2f67c164f7314afb
7
+ data.tar.gz: 227e26694aa3a084856abe468f4f2676cf358309ca0055d76345bd6141e0a5c8c1d90db844eb733c7f2dafec1de58e02fd3492d5e1c6ab4e8309755037333d00
data/README.md CHANGED
@@ -33,6 +33,12 @@ expect('101').to eq(JSON.parse(r.body)['extensionNumber'])
33
33
  ```
34
34
 
35
35
 
36
+ ### Token Refresh
37
+
38
+ Access token expires. You need to call `rc.refresh()` before it expores.
39
+ If you want the SDK to do auto refresh please `rc.auto_refresh = true` before authorization.
40
+
41
+
36
42
  ### Send SMS
37
43
 
38
44
  ```ruby
@@ -5,16 +5,6 @@ require 'concurrent'
5
5
  require 'faraday'
6
6
  require 'tmpdir'
7
7
 
8
- class MockResponse
9
- def initialize(body)
10
- @body = body
11
- end
12
-
13
- def body
14
- @body
15
- end
16
- end
17
-
18
8
  class RingCentral
19
9
  def self.SANDBOX_SERVER
20
10
  'https://platform.devtest.ringcentral.com'
@@ -31,7 +21,7 @@ class RingCentral
31
21
  @app_key = app_key
32
22
  @app_secret = app_secret
33
23
  @server = server
34
- @auto_refresh = true
24
+ @auto_refresh = false
35
25
  @token = nil
36
26
  @timer = nil
37
27
  @faraday = Faraday.new(url: server) do |faraday|
@@ -114,7 +104,7 @@ class RingCentral
114
104
  @faraday.post do |req|
115
105
  req.url endpoint
116
106
  req.params = params
117
- if files != nil && files.size > 0 # send fax
107
+ if files != nil && files.size > 0 # send fax or MMS
118
108
  io = StringIO.new(payload.to_json)
119
109
  payload = {}
120
110
  payload[:json] = Faraday::UploadIO.new(io, 'application/json')
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |gem|
2
2
  gem.name = 'ringcentral-sdk'
3
- gem.version = '0.8.0'
3
+ gem.version = '0.8.1'
4
4
  gem.authors = ['Tyler Liu']
5
5
  gem.email = ['tyler.liu@ringcentral.com']
6
6
  gem.description = 'Ruby SDK for you to access RingCentral platform API.'
@@ -12,7 +12,7 @@ RSpec.describe 'RingCentral' do
12
12
  expect('app_key').to eq(rc.app_key)
13
13
  expect('app_secret').to eq(rc.app_secret)
14
14
  expect('https://platform.devtest.ringcentral.com').to eq(rc.server)
15
- expect(true).to eq(rc.auto_refresh)
15
+ expect(false).to eq(rc.auto_refresh)
16
16
  end
17
17
 
18
18
  it 'test_authorize_uri' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ringcentral-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tyler Liu