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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 432efc1484acfb5ca731fe491f37c5e203b4bf03
4
- data.tar.gz: fd167aeba9e7b2870c39fe10caeb4a50428f09d5
3
+ metadata.gz: 67c741a8a81590f3d6367c70727ef897ea6449e6
4
+ data.tar.gz: 98d97baf28618afa0d09070da51cc52f22fc9336
5
5
  SHA512:
6
- metadata.gz: 91f829a401c14894c6350f3ceb7f5fbdf7c31141117c7aac89c13dbf9f89b7069a9adeb54f98bc649613cedf5c2c16e5ea6ba0be1298a7626caf1ea838a8b82f
7
- data.tar.gz: 74be10a918eb09892480407a988af0331d8ec4f8fa1e4559aadcd39d8e8d001a2182ace6dd775a1274391f73900a96e50535e64f32f16a9c34baceb5342e2a69
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
 
@@ -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
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Winker
2
- VERSION = "0.0.14"
2
+ VERSION = "0.0.15"
3
3
  end
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.14
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-04-14 00:00:00.000000000 Z
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.2.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