youtube_query 1.0.6 → 1.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/youtube_query.rb +22 -1
- data/youtube_query.gemspec +1 -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: 2531b0b7585932ec7ab3108825cb925ad1616ef8
|
4
|
+
data.tar.gz: 61c353a9f7bcc00e613dfa636a4f77c814cf7da3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 78d8386eaded2f1cf717df570b7ee86b4bf19b4cb70912a7633fee102b3c629128a128c197588fc530a8569a3ff8cf06f06a7c8f654d1816160dbe7445cdd521
|
7
|
+
data.tar.gz: 2054bc881d5a76441f468bf2d8b24a8e23649723f24cf3567ed1f551b2e366154d4426fb6af46ad7e1be4a00f7b7a0cb316feb3d2ab10c9ebc9eb4eea0148644
|
data/lib/youtube_query.rb
CHANGED
@@ -16,7 +16,28 @@ class YouTubeQuery
|
|
16
16
|
|
17
17
|
def self.query(options={})
|
18
18
|
|
19
|
-
|
19
|
+
options = {
|
20
|
+
:part => 'id,snippet'
|
21
|
+
}.merge(options)
|
22
|
+
|
23
|
+
search_response = @@client.execute!(
|
24
|
+
:api_method => @@youtube.search.list,
|
25
|
+
:parameters => options
|
26
|
+
)
|
27
|
+
|
28
|
+
# videos = []
|
29
|
+
#
|
30
|
+
# search_response.data.items.each do |search_result|
|
31
|
+
# videos.push({
|
32
|
+
# :id => search_result.id.videoId,
|
33
|
+
# :title => search_result.snippet.title,
|
34
|
+
# :publishedAt => search_result.snippet.publishedAt,
|
35
|
+
# :description => search_result.snippet.description,
|
36
|
+
# :thumbnail => search_result.snippet.thumbnails.medium.url
|
37
|
+
# })
|
38
|
+
# end
|
39
|
+
|
40
|
+
return search_response.data.items
|
20
41
|
|
21
42
|
end
|
22
43
|
|
data/youtube_query.gemspec
CHANGED