winker 0.0.14 → 0.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +5 -1
- data/lib/winker.rb +2 -1
- data/lib/winker/connection.rb +2 -2
- data/lib/winker/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 67c741a8a81590f3d6367c70727ef897ea6449e6
|
4
|
+
data.tar.gz: 98d97baf28618afa0d09070da51cc52f22fc9336
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 75765687ad49c511a1e632674d458bd866faefe1976627bf81dabb6dab4772f692e92f05b2a73c1e44c04ef07ec1c49080e0c2177fd767f3c47f37853a0ce39b
|
7
|
+
data.tar.gz: 6c9b0cd993f41396cdd21940907440e28aee5349070fc3684416aaa9c79e6c9811f791ab191164a3a338c7cb4ff5098e3cd11c803f966fbfc95e78f1dbb58a66
|
data/README.md
CHANGED
@@ -27,6 +27,9 @@ Or install it yourself as:
|
|
27
27
|
|
28
28
|
## Usage
|
29
29
|
|
30
|
+
For an example of how I make use of it. Check out my project at https://github.com/KellyMahan/MyHome . It shows all the gems I'm currently using along with some setup scripts. Currently I combine Winker WinkerAI and AmazonEchoJS for voice controlled home automation.
|
31
|
+
|
32
|
+
If you just want to interface with the API then the basic gem usage is below.
|
30
33
|
|
31
34
|
Winker.configure do |wink|
|
32
35
|
wink.client_id = "******************"
|
@@ -37,6 +40,7 @@ Or install it yourself as:
|
|
37
40
|
wink.password = "**********"
|
38
41
|
wink.endpoint = "https://winkapi.quirky.com"
|
39
42
|
wink.wait_for_updates = true #this is the default setting is optional
|
43
|
+
wink.logger = Logger.new($stdout) #this is the default setting is optional
|
40
44
|
end
|
41
45
|
|
42
46
|
#retrieve the access_token and refresh_token
|
@@ -183,7 +187,7 @@ Each device has it's own associated type. To make things easier when devices are
|
|
183
187
|
#Future plans
|
184
188
|
|
185
189
|
1. I need to add more functionality that the api provides as well as more helper methods for devices that I don't have and can't test.
|
186
|
-
2. I'm getting an Amazon Echo in April that I plan on integrating as a separate gem.
|
190
|
+
2. (DONE!! https://github.com/KellyMahan/MyHome) I'm getting an Amazon Echo in April that I plan on integrating as a separate gem.
|
187
191
|
3. I've already started on winker-rails gem that currently works with light bulbs on off and brightness. I'll release it soon and continue to add functionality.
|
188
192
|
|
189
193
|
|
data/lib/winker.rb
CHANGED
@@ -36,10 +36,11 @@ module Winker
|
|
36
36
|
end
|
37
37
|
|
38
38
|
module Configuration
|
39
|
-
attr_accessor :client_id, :client_secret, :access_token, :refresh_token, :username, :password, :endpoint, :server_time_dif, :wait_for_updates
|
39
|
+
attr_accessor :client_id, :client_secret, :access_token, :refresh_token, :username, :password, :endpoint, :server_time_dif, :wait_for_updates, :logger
|
40
40
|
|
41
41
|
def configure
|
42
42
|
self.wait_for_updates = true
|
43
|
+
self.logger = Logger.new($stdout)
|
43
44
|
yield self
|
44
45
|
end
|
45
46
|
end
|
data/lib/winker/connection.rb
CHANGED
@@ -9,7 +9,7 @@ module Winker
|
|
9
9
|
conn.response :json, :content_type => /\bjson$/
|
10
10
|
|
11
11
|
conn.authorization :bearer, Winker.access_token if Winker.access_token
|
12
|
-
conn.response :detailed_logger
|
12
|
+
conn.response :detailed_logger, Winker.logger if Winker.logger
|
13
13
|
|
14
14
|
conn.adapter Faraday.default_adapter # make requests with Net::HTTP
|
15
15
|
end
|
@@ -36,4 +36,4 @@ module Winker
|
|
36
36
|
end
|
37
37
|
end
|
38
38
|
end
|
39
|
-
end
|
39
|
+
end
|
data/lib/winker/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: winker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kelly Mahan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-07-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -173,7 +173,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
173
173
|
version: '0'
|
174
174
|
requirements: []
|
175
175
|
rubyforge_project:
|
176
|
-
rubygems_version: 2.
|
176
|
+
rubygems_version: 2.4.5
|
177
177
|
signing_key:
|
178
178
|
specification_version: 4
|
179
179
|
summary: Winker is a gem written to support the wink api and any other associated
|