easy_upnp 1.1.6 → 1.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +20 -1
- data/bin/upnp-list +1 -1
- data/lib/easy_upnp/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cd20723f9549460ebde6c951bbef4b2df0a41296
|
4
|
+
data.tar.gz: 718377c74cc753bb0e4ffdeb0d71cb9ef221ef8d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 790ddf169ef51a92ec74fe61ce659bc1d0edf9cf021cb2a1e5b044caf8324fe4f97e07e2d2fc69049179e8f4927e6848b2493b0e68574cbd8b29637e08362998
|
7
|
+
data.tar.gz: a4c40f79b14bb9be533b94b18d7f5ea5f6efd209e89f5df8ee1c2ec1a9553f4a802d82430c4c7b80091c1370f973d3db3a4a74c0280b07288383dcbef008748d
|
data/README.md
CHANGED
@@ -203,7 +203,12 @@ If you don't want to have to set up an HTTP endpoint to listen to events, you ca
|
|
203
203
|
|
204
204
|
```ruby
|
205
205
|
# Parse and print the XML body of the request
|
206
|
-
callback = ->(
|
206
|
+
callback = ->(state_vars) do
|
207
|
+
state_vars.map do |var, value|
|
208
|
+
puts "#{var} ==>"
|
209
|
+
puts Nokogiri::XML(value).to_xml
|
210
|
+
end
|
211
|
+
end
|
207
212
|
manager = service.on_event(callback)
|
208
213
|
|
209
214
|
# End the subscription and shut down the internal HTTP server
|
@@ -213,6 +218,20 @@ manager.unsubscribe
|
|
213
218
|
manager.subscribe
|
214
219
|
```
|
215
220
|
|
221
|
+
Here's an example of some output from the above callback:
|
222
|
+
|
223
|
+
```
|
224
|
+
LastChange ==>
|
225
|
+
<?xml version="1.0"?>
|
226
|
+
<Event xmlns="urn:schemas-upnp-org:metadata-1-0/RCS/">
|
227
|
+
<InstanceID val="0">
|
228
|
+
<PresetNameList val="FactoryDefaults"/>
|
229
|
+
<Mute val="0" channel="Master"/>
|
230
|
+
<Volume val="20" channel="Master"/>
|
231
|
+
</InstanceID>
|
232
|
+
</Event>
|
233
|
+
```
|
234
|
+
|
216
235
|
While the default configurations are probably fine for most situations, you can configure both the internal HTTP server and the subscription manager when you call `on_event` by passing a configuration block:
|
217
236
|
|
218
237
|
```ruby
|
data/bin/upnp-list
CHANGED
data/lib/easy_upnp/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: easy_upnp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christopher Mullins
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-04-
|
11
|
+
date: 2016-04-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|