ringcentral-sdk 0.9.0 → 0.9.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +22 -5
- data/ringcentral-sdk.gemspec +6 -6
- metadata +23 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: ecc70101c8a49551105f83e593be979fe25a2ab7
|
4
|
+
data.tar.gz: 22981b9c0d649af8da86ef9de9d6f507fb82ceac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 052b9067500e5b0d781b3b026ba4670496b27e7fdc3ec8ca532f92869350978104cc7535089d79c6588afac7e844ad03543087ee37b695382046ebcdb77f6610
|
7
|
+
data.tar.gz: de0b01dff34151dba3ce24c4edc79cf6cf6103707d77b1a767808c79f5380dc1f433763a20df574f04689add934cce619ac80e8e7124e8eff72fe01ec7ebe25b
|
data/README.md
CHANGED
@@ -1,10 +1,14 @@
|
|
1
|
-
#
|
1
|
+
# RingCentral SDK for Ruby
|
2
2
|
|
3
3
|
[![Build Status](https://travis-ci.org/ringcentral/ringcentral-ruby.svg?branch=master)](https://travis-ci.org/ringcentral/ringcentral-ruby)
|
4
4
|
[![Coverage Status](https://coveralls.io/repos/github/ringcentral/ringcentral-ruby/badge.svg?branch=master)](https://coveralls.io/github/ringcentral/ringcentral-ruby?branch=master)
|
5
|
+
[![Community](https://img.shields.io/badge/dynamic/json.svg?label=community&colorB=&suffix=%20users&query=$.approximate_people_count&uri=http%3A%2F%2Fapi.getsatisfaction.com%2Fcompanies%2F102909.json)](https://devcommunity.ringcentral.com/ringcentraldev)
|
6
|
+
[![Twitter](https://img.shields.io/twitter/follow/ringcentraldevs.svg?style=social&label=follow)](https://twitter.com/RingCentralDevs)
|
5
7
|
|
6
|
-
|
8
|
+
__[RingCentral Developers](https://developer.ringcentral.com/api-products)__ is a cloud communications platform which can be accessed via more than 70 APIs. The platform's main capabilities include technologies that enable:
|
9
|
+
__[Voice](https://developer.ringcentral.com/api-products/voice), [SMS/MMS](https://developer.ringcentral.com/api-products/sms), [Fax](https://developer.ringcentral.com/api-products/fax), [Glip Team Messaging](https://developer.ringcentral.com/api-products/team-messaging), [Data and Configurations](https://developer.ringcentral.com/api-products/configuration)__.
|
7
10
|
|
11
|
+
[API Reference](https://developer.ringcentral.com/api-docs/latest/index.html) and [APIs Explorer](https://developer.ringcentral.com/api-explorer/latest/index.html).
|
8
12
|
|
9
13
|
## Installation
|
10
14
|
|
@@ -32,8 +36,8 @@ https://developer.ringcentral.com/api-docs/latest/index.html
|
|
32
36
|
```ruby
|
33
37
|
require 'ringcentral'
|
34
38
|
|
35
|
-
rc = RingCentral.new(
|
36
|
-
rc.authorize(username:
|
39
|
+
rc = RingCentral.new('clientID', 'clientSecret', 'serverURL')
|
40
|
+
rc.authorize(username: 'username', extension: 'extension', password: 'password')
|
37
41
|
|
38
42
|
# get
|
39
43
|
r = rc.get('/restapi/v1.0/account/~/extension/~')
|
@@ -48,6 +52,15 @@ Access token expires. You need to call `rc.refresh()` before it expires.
|
|
48
52
|
If you want the SDK to do auto refresh please `rc.auto_refresh = true` before authorization.
|
49
53
|
|
50
54
|
|
55
|
+
### Load preexisting token
|
56
|
+
|
57
|
+
Let's say you already have a token. Then you can load it like this: `rc.token = your_token_object`.
|
58
|
+
|
59
|
+
The benifits of loading a preexisting token is you don't need to go through any authorization flow.
|
60
|
+
|
61
|
+
If what you have is a string instead of a Ruby object, you need to convert it first: `JSON.parse(your_token_string)`.
|
62
|
+
|
63
|
+
|
51
64
|
### Send SMS
|
52
65
|
|
53
66
|
```ruby
|
@@ -113,6 +126,10 @@ For more sample code, please refer to the [test cases](/spec).
|
|
113
126
|
|
114
127
|
## How to test
|
115
128
|
|
129
|
+
```
|
130
|
+
bundle install --path vendor/bundle
|
131
|
+
```
|
132
|
+
|
116
133
|
Create `.env` file with the following content:
|
117
134
|
|
118
135
|
```
|
@@ -127,7 +144,7 @@ RINGCENTRAL_RECEIVER=
|
|
127
144
|
|
128
145
|
`RINGCENTRAL_RECEIVER` is a phone number to receive SMS, Fax..etc.
|
129
146
|
|
130
|
-
Run `rspec`
|
147
|
+
Run `bundle exec rspec`
|
131
148
|
|
132
149
|
|
133
150
|
## License
|
data/ringcentral-sdk.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |gem|
|
2
2
|
gem.name = 'ringcentral-sdk'
|
3
|
-
gem.version = '0.9.
|
3
|
+
gem.version = '0.9.2'
|
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.'
|
@@ -13,9 +13,9 @@ Gem::Specification.new do |gem|
|
|
13
13
|
gem.files += Dir['lib/**/*.rb']
|
14
14
|
gem.test_files = Dir['spec/**/*.rb']
|
15
15
|
|
16
|
-
gem.add_dependency('addressable', '~> 2.
|
17
|
-
gem.add_dependency('concurrent-ruby', '~> 1.
|
18
|
-
gem.add_dependency('pubnub', '~> 4.
|
19
|
-
gem.add_dependency('faraday', '~> 0.
|
20
|
-
gem.add_dependency('faraday_middleware', '~> 0.
|
16
|
+
gem.add_dependency('addressable', '~> 2.6', '>= 2.6.0')
|
17
|
+
gem.add_dependency('concurrent-ruby', '~> 1.1', '>= 1.1.5')
|
18
|
+
gem.add_dependency('pubnub', '~> 4.1', '>= 4.1.2')
|
19
|
+
gem.add_dependency('faraday', '~> 0.15', '>= 0.15.4')
|
20
|
+
gem.add_dependency('faraday_middleware', '~> 0.13', '>= 0.13.1')
|
21
21
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ringcentral-sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tyler Liu
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-06-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -16,100 +16,100 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '2.
|
19
|
+
version: '2.6'
|
20
20
|
- - ">="
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: 2.
|
22
|
+
version: 2.6.0
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
27
|
- - "~>"
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: '2.
|
29
|
+
version: '2.6'
|
30
30
|
- - ">="
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: 2.
|
32
|
+
version: 2.6.0
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: concurrent-ruby
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
36
36
|
requirements:
|
37
37
|
- - "~>"
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version: '1.
|
39
|
+
version: '1.1'
|
40
40
|
- - ">="
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: 1.
|
42
|
+
version: 1.1.5
|
43
43
|
type: :runtime
|
44
44
|
prerelease: false
|
45
45
|
version_requirements: !ruby/object:Gem::Requirement
|
46
46
|
requirements:
|
47
47
|
- - "~>"
|
48
48
|
- !ruby/object:Gem::Version
|
49
|
-
version: '1.
|
49
|
+
version: '1.1'
|
50
50
|
- - ">="
|
51
51
|
- !ruby/object:Gem::Version
|
52
|
-
version: 1.
|
52
|
+
version: 1.1.5
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
54
|
name: pubnub
|
55
55
|
requirement: !ruby/object:Gem::Requirement
|
56
56
|
requirements:
|
57
57
|
- - "~>"
|
58
58
|
- !ruby/object:Gem::Version
|
59
|
-
version: '4.
|
59
|
+
version: '4.1'
|
60
60
|
- - ">="
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version: 4.
|
62
|
+
version: 4.1.2
|
63
63
|
type: :runtime
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
67
|
- - "~>"
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version: '4.
|
69
|
+
version: '4.1'
|
70
70
|
- - ">="
|
71
71
|
- !ruby/object:Gem::Version
|
72
|
-
version: 4.
|
72
|
+
version: 4.1.2
|
73
73
|
- !ruby/object:Gem::Dependency
|
74
74
|
name: faraday
|
75
75
|
requirement: !ruby/object:Gem::Requirement
|
76
76
|
requirements:
|
77
77
|
- - "~>"
|
78
78
|
- !ruby/object:Gem::Version
|
79
|
-
version: '0.
|
79
|
+
version: '0.15'
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 0.
|
82
|
+
version: 0.15.4
|
83
83
|
type: :runtime
|
84
84
|
prerelease: false
|
85
85
|
version_requirements: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '0.
|
89
|
+
version: '0.15'
|
90
90
|
- - ">="
|
91
91
|
- !ruby/object:Gem::Version
|
92
|
-
version: 0.
|
92
|
+
version: 0.15.4
|
93
93
|
- !ruby/object:Gem::Dependency
|
94
94
|
name: faraday_middleware
|
95
95
|
requirement: !ruby/object:Gem::Requirement
|
96
96
|
requirements:
|
97
97
|
- - "~>"
|
98
98
|
- !ruby/object:Gem::Version
|
99
|
-
version: '0.
|
99
|
+
version: '0.13'
|
100
100
|
- - ">="
|
101
101
|
- !ruby/object:Gem::Version
|
102
|
-
version: 0.
|
102
|
+
version: 0.13.1
|
103
103
|
type: :runtime
|
104
104
|
prerelease: false
|
105
105
|
version_requirements: !ruby/object:Gem::Requirement
|
106
106
|
requirements:
|
107
107
|
- - "~>"
|
108
108
|
- !ruby/object:Gem::Version
|
109
|
-
version: '0.
|
109
|
+
version: '0.13'
|
110
110
|
- - ">="
|
111
111
|
- !ruby/object:Gem::Version
|
112
|
-
version: 0.
|
112
|
+
version: 0.13.1
|
113
113
|
description: Ruby SDK for you to access RingCentral platform API.
|
114
114
|
email:
|
115
115
|
- tyler.liu@ringcentral.com
|
@@ -146,7 +146,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
146
146
|
version: '0'
|
147
147
|
requirements: []
|
148
148
|
rubyforge_project:
|
149
|
-
rubygems_version: 2.
|
149
|
+
rubygems_version: 2.5.2.3
|
150
150
|
signing_key:
|
151
151
|
specification_version: 4
|
152
152
|
summary: RingCentral Ruby SDK.
|