eyeq_metadata 1.2.2 → 1.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +22 -3
- data/lib/eyeq_metadata.rb +7 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eb732576e3a6d9916329200ed148b0206f9e461a
|
4
|
+
data.tar.gz: 2fedc9b766b370c627d0b1f1d9063e254a3caf6a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a844608c32a816043cbae772d8c30bc41b4352fd281d5370e141b3ac91e365975fb39c6171be7b555d765ecea115a6ce39826e6df21c3bd3c78efa73e88860e
|
7
|
+
data.tar.gz: 8a6b16f1b6a245bc8f5274824c22d110ce23849adffa5e67ebb7827bb85e43e0897b048e71e68db3ca2f4dc53cd3ea9fcf45c0c8991e21b07f4407b22a0a9d72
|
data/README.md
CHANGED
@@ -10,13 +10,32 @@ gem install eyeq_metadata
|
|
10
10
|
require 'eyeq_metadata'
|
11
11
|
|
12
12
|
eyeq = EyeQ.new(clientid, clientid_tag)
|
13
|
-
response.request(
|
14
|
-
#returns a Nokogiri::XML object that contains the response from eyeq
|
13
|
+
response.request(query_type: 'tvchannel_fetch', gnid: '123-456-789')
|
14
|
+
# returns a Nokogiri::XML object that contains the response from eyeq
|
15
|
+
|
16
|
+
# list of supported searches
|
17
|
+
# ----------------------- EPG
|
18
|
+
# tvchannel_fetch - :gnid
|
19
|
+
# tvchannel_lookup_by_provider - :gnid
|
20
|
+
# tvprovider_na - :zipcode
|
21
|
+
# tvprovider_or - :tvregion
|
22
|
+
# tvprogram_fetch - :gnid
|
23
|
+
# tvgrid_search - :program_title & :tvchannel_gnid (optional :date_start & :date_end)
|
24
|
+
# tvgrid_lookup - :tvchannel_gnid (optional :date_start & :date_end)
|
25
|
+
# ----------------------- VIDEO
|
26
|
+
# avwork_fetch - :gnid
|
15
27
|
```
|
16
28
|
|
17
29
|
##Navigating Nokogiri::XML objects
|
18
30
|
[Nokogiri Docs](http://www.nokogiri.org/tutorials/searching_a_xml_html_document.html)
|
19
31
|
```ruby
|
20
32
|
response.css('RESPONSES')
|
21
|
-
#returns RESPONSES from Nokogiri::XML
|
33
|
+
#returns all RESPONSES from Nokogiri::XML
|
34
|
+
```
|
35
|
+
|
36
|
+
##Contributing
|
37
|
+
Feel free to create a pull request!
|
38
|
+
```shell
|
39
|
+
# installing gem requirements
|
40
|
+
bundle install
|
22
41
|
```
|
data/lib/eyeq_metadata.rb
CHANGED
@@ -65,9 +65,11 @@ class EyeQ
|
|
65
65
|
when 'tvgrid_lookup'
|
66
66
|
throw new Error(':tvchannel_gnid option required') if options[:tvchannel_gnid].nil?
|
67
67
|
query_type = tvgrid_lookup(options)
|
68
|
+
when 'avwork_fetch'
|
69
|
+
throw new Error(':gnid option required') if options[:gnid].nil?
|
70
|
+
query_type = avwork_fetch(options[:gnid])
|
68
71
|
end
|
69
72
|
|
70
|
-
puts query_type
|
71
73
|
query_type
|
72
74
|
end
|
73
75
|
|
@@ -128,6 +130,10 @@ class EyeQ
|
|
128
130
|
query << "</TVCHANNEL>#{insert_date_time(options)}</QUERY>"
|
129
131
|
end
|
130
132
|
|
133
|
+
def avwork_fetch(gnid)
|
134
|
+
"<QUERY CMD='AV_WORK_FETCH'><GN_ID>#{gnid}</GN_ID></QUERY>"
|
135
|
+
end
|
136
|
+
|
131
137
|
def insert_date_time(options)
|
132
138
|
date_start = options[:date_start] unless options[:date_start].nil?
|
133
139
|
date_end = options[:date_end] unless options[:date_end].nil?
|