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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9e7bab6e1d7eb7f898297f5f1c350a800e9bfcb7
4
- data.tar.gz: 2fba2068d4a125b24ddca0808a7e49981281083b
3
+ metadata.gz: 82a6e4608633ae7f281b28b16406b488f58e06d3
4
+ data.tar.gz: 54aa946c5f1777f800d1a1b68dac3ead134e6f95
5
5
  SHA512:
6
- metadata.gz: 153091bc0d40028cdddcb87c33cc987d28d630bf05ce34ab7e75ab370992cbe448f547650388116fa351ad9d769ba98987b9513ae6d040af61297bd5aa31efa7
7
- data.tar.gz: be05e4a6bc6e80d85322993b3c2b9974b3671f7e05a2ca25d4d00af7f9e3486c457e4b74e185c37174e702b07f52763c2012371709dd0f1dea5a2446020c20c5
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
- ###### `klass.fetch_all`
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
- ###### `klass.fetch`
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
- ###### `klass.create`
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
- ###### `klass.update`
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
- ###### `klass.detroy`
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
- ###### `klass.parse_collection`
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
- ###### `klass.parse`
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
- ###### `klass.new`
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
@@ -7,6 +7,7 @@ require "cisco_spark/models/membership"
7
7
  require "cisco_spark/models/message"
8
8
  require "cisco_spark/models/person"
9
9
  require "cisco_spark/models/room"
10
+ require "cisco_spark/models/webhook"
10
11
 
11
12
 
12
13
  module CiscoSpark
@@ -1,3 +1,3 @@
1
1
  module CiscoSpark
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.3"
3
3
  end
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.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-04-10 00:00:00.000000000 Z
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"