viddlereo 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.1.2
@@ -38,10 +38,13 @@ module Viddlereo
38
38
 
39
39
  def self.find_by_id(playlist_id, options = {})
40
40
  begin
41
- parse(get(:method => :getDetails,
41
+ response = get(:method => :getDetails,
42
42
  :playlist_id => playlist_id,
43
43
  :per_page => options[:per_page] || 100,
44
- :page => options[:page] || 1)).first
44
+ :page => options[:page] || 1)
45
+ playlist = parse(response).first
46
+ playlist.videos = Viddlereo::Video.parse(response) if playlist
47
+ playlist
45
48
  rescue RestClient::ResourceNotFound
46
49
  nil
47
50
  end
@@ -49,10 +52,11 @@ module Viddlereo
49
52
 
50
53
  def self.find_by_user(user, options = {})
51
54
  begin
52
- parse(get(:method => :getByUser,
55
+ response = get(:method => :getByUser,
53
56
  :user => user,
54
57
  :per_page => options[:per_page] || 100,
55
- :page => options[:page] || 1))
58
+ :page => options[:page] || 1)
59
+ parse(response)
56
60
  rescue RestClient::ResourceNotFound
57
61
  []
58
62
  end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{viddlereo}
8
- s.version = "0.1.1"
8
+ s.version = "0.1.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Dan Pickett"]
12
- s.date = %q{2010-11-20}
12
+ s.date = %q{2010-11-21}
13
13
  s.description = %q{Viddler + Ruby = Great Video Success}
14
14
  s.email = %q{dpickett@enlightsolutions.com}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: viddlereo
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 31
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 1
10
- version: 0.1.1
9
+ - 2
10
+ version: 0.1.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Dan Pickett
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-11-20 00:00:00 -05:00
18
+ date: 2010-11-21 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency