youtube_query 1.0.1 → 1.0.2

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: e21cb5ea97a5ffd18320713767dccfa7f3b5528d
4
- data.tar.gz: 78b5e454ef83592748ccb4512e02dcba33368cb6
3
+ metadata.gz: f9af8c321566c59ac611ebc841227364d64d39e6
4
+ data.tar.gz: 1594e251a989d797c65d3edd06e3895b9d7db41f
5
5
  SHA512:
6
- metadata.gz: 72a648b29ee7be1999a16adebe8a996abd5fca1bc1a3765353633926f33c63433988e32c46f8f30b1e006bdd9e45c6ba1d07cbafa906301592e278b58843224c
7
- data.tar.gz: dc14793ea2921f583dfcb38aebd1be215975cb837a8da243ee3ecb3d944cd3eedb88d83daab54d06b439df844c468d3e6c3bd9084784a311df161a4ae904d7c9
6
+ metadata.gz: 6f9d0a8cf75f54cd395eefc9d2723541d541a12e7c7a01d2f1b54eece6ff81e1714785d2fc5a2da074770e6c0646e5ae042f9e3ffd5559c0fe194320319aa0c2
7
+ data.tar.gz: 0343d7a867fce004ca4013c9a02134fd65f5c9aa71474a45d6f1220ebf879e7c7d27de629513e7cb480779ce59518d63ee781fc8538fb3cb4562d0c1451054e2
data/lib/youtube_query.rb CHANGED
@@ -2,7 +2,7 @@ require 'google/api_client'
2
2
 
3
3
  class YouTubeQuery
4
4
 
5
- def self.new(options={})
5
+ def initialize(options={})
6
6
 
7
7
  options = {
8
8
  :youtube_api_service_name => "youtube",
@@ -25,18 +25,8 @@ class YouTubeQuery
25
25
  :parameters => options
26
26
  )
27
27
 
28
- videos = []
29
-
30
- # Add each result to the appropriate list, and then display the lists of
31
- # matching videos, channels, and playlists.
32
- search_response.data.items.each do |search_result|
33
- case search_result.id.kind
34
- when 'youtube#video'
35
- videos.push("#{search_result.snippet.title} (#{search_result.id.videoId})")
36
- end
37
- end
38
-
39
- return videos
28
+ return search_response.data.items
40
29
 
41
30
  end
31
+
42
32
  end
@@ -1,9 +1,11 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'youtube_query'
3
- s.version = '1.0.1'
3
+ s.version = '1.0.2'
4
4
  s.summary = ''
5
5
  s.description = 'Gem for searching youtube videos'
6
6
  s.authors = ["Martyn Bissett"]
7
7
  s.homepage = 'https://github.com/martynbiz/youtube_query'
8
8
  s.files = Dir.glob("lib/**/*") + %w(README.md youtube_query.gemspec)
9
+ s.add_runtime_dependency 'google-api-client', ['~> 0.7.1']
10
+ s.add_development_dependency 'google-api-client', ['~> 0.7.1']
9
11
  end
metadata CHANGED
@@ -1,15 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: youtube_query
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martyn Bissett
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-11 00:00:00.000000000 Z
12
- dependencies: []
11
+ date: 2014-05-12 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: google-api-client
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: 0.7.1
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: 0.7.1
27
+ - !ruby/object:Gem::Dependency
28
+ name: google-api-client
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: 0.7.1
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ~>
39
+ - !ruby/object:Gem::Version
40
+ version: 0.7.1
13
41
  description: Gem for searching youtube videos
14
42
  email:
15
43
  executables: []