cisco_spark 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.env.example +1 -0
- data/README.md +18 -9
- data/lib/cisco_spark.rb +1 -0
- data/lib/cisco_spark/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 82a6e4608633ae7f281b28b16406b488f58e06d3
|
4
|
+
data.tar.gz: 54aa946c5f1777f800d1a1b68dac3ead134e6f95
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f7314eff69c82518c4fd557767e78f7b7d8fd28c31057794c103f89db0779aa7c26697bffb7f7c439d70cd0490fc7e029b645c40a1bb38e04c6145bd4ae4a9f
|
7
|
+
data.tar.gz: 11fac2fbb7388fedccf9468e7992cf6cc872466c78ffc2e6705ef6bf7faf19e55002f4cfa3dc52beecc02039be9536b24f43002e7053678395ee64755b3b24dd
|
data/.env.example
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
API_KEY=YOUR_KEY
|
data/README.md
CHANGED
@@ -43,9 +43,18 @@ end
|
|
43
43
|
```
|
44
44
|
|
45
45
|
### Models
|
46
|
-
All models have methods to interact with the API and parse response data
|
46
|
+
All models have methods to interact with the API and parse response data.
|
47
47
|
|
48
|
-
|
48
|
+
Inlcuded models:
|
49
|
+
- `CiscoSpark::Person`
|
50
|
+
- `CiscoSpark::Room`
|
51
|
+
- `CiscoSpark::Membership`
|
52
|
+
- `CiscoSpark::Message`
|
53
|
+
- `CiscoSpark::Webhook`
|
54
|
+
|
55
|
+
You can call all the following methods on any of these models
|
56
|
+
|
57
|
+
###### `class.fetch_all`
|
49
58
|
Fetches all records for a given model, returns a `CiscoSpark::Collection`
|
50
59
|
Accepts any parameters that the API allows.
|
51
60
|
|
@@ -54,7 +63,7 @@ rooms = CiscoSpark::Room.fetch_all(max: 5)
|
|
54
63
|
=> #<CiscoSpark::Collection>
|
55
64
|
```
|
56
65
|
|
57
|
-
###### `
|
66
|
+
###### `class.fetch`
|
58
67
|
Fetches a single record for the given resource ID, returns an instance
|
59
68
|
Accepts any parameters that the API allows.
|
60
69
|
|
@@ -63,7 +72,7 @@ room = CiscoSpark::Room.fetch('Y2lzY...', show_sip_address: true)
|
|
63
72
|
=> #<CiscoSpark::Room>
|
64
73
|
```
|
65
74
|
|
66
|
-
###### `
|
75
|
+
###### `class.create`
|
67
76
|
Creates a resource with given attribues, returns an instance
|
68
77
|
Accepts any parameters that the API allows.
|
69
78
|
|
@@ -72,7 +81,7 @@ room = CiscoSpark::Room.create(title: 'Ruby Room')
|
|
72
81
|
=> #<CiscoSpark::Room>
|
73
82
|
```
|
74
83
|
|
75
|
-
###### `
|
84
|
+
###### `class.update`
|
76
85
|
Updates a resource with given attribues, returns an instance
|
77
86
|
Accepts any parameters that the API allows.
|
78
87
|
|
@@ -81,7 +90,7 @@ room = CiscoSpark::Room.update('Y2lzY...', title: 'Groovey Ruby Room')
|
|
81
90
|
=> #<CiscoSpark::Room>
|
82
91
|
```
|
83
92
|
|
84
|
-
###### `
|
93
|
+
###### `class.destroy`
|
85
94
|
Destroys a resource with the given ID, returns an boolean to indicate success
|
86
95
|
Accepts any parameters that the API allows.
|
87
96
|
|
@@ -90,7 +99,7 @@ room = CiscoSpark::Room.destroy('Y2lzY...')
|
|
90
99
|
=> true
|
91
100
|
```
|
92
101
|
|
93
|
-
###### `
|
102
|
+
###### `class.parse_collection`
|
94
103
|
Parses a valid JSON string or a ruby hash/array into a collection of models.
|
95
104
|
This is useful for processing data recieved from a webhook etc.
|
96
105
|
|
@@ -100,7 +109,7 @@ rooms = CiscoSpark::Room.parse_collection(json_string)
|
|
100
109
|
=> #<CiscoSpark::Collection>
|
101
110
|
```
|
102
111
|
|
103
|
-
###### `
|
112
|
+
###### `class.parse`
|
104
113
|
Parses a valid JSON string or a ruby hash/array into a model.
|
105
114
|
This is useful for processing data recieved from a webhook etc.
|
106
115
|
|
@@ -110,7 +119,7 @@ room = CiscoSpark::Room.parse(json_string)
|
|
110
119
|
=> #<CiscoSpark::Room>
|
111
120
|
```
|
112
121
|
|
113
|
-
###### `
|
122
|
+
###### `class.new`
|
114
123
|
Creates a new instance of the model with given attributes
|
115
124
|
|
116
125
|
```ruby
|
data/lib/cisco_spark.rb
CHANGED
data/lib/cisco_spark/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cisco_spark
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Maher
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-05-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -88,6 +88,7 @@ extensions: []
|
|
88
88
|
extra_rdoc_files: []
|
89
89
|
files:
|
90
90
|
- ".coveralls.yml"
|
91
|
+
- ".env.example"
|
91
92
|
- ".gitignore"
|
92
93
|
- ".rspec"
|
93
94
|
- ".ruby-version"
|