themoviedb 0.0.14 → 0.0.15

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: 150958669d746edcb3042292a7bd77d49e1c4ab4
4
- data.tar.gz: 96c536fcc8eec0f14b76bfe6e75b805d0db6799f
3
+ metadata.gz: 08f80cd2c5aff303956bbfcccb2d796feaf54121
4
+ data.tar.gz: 11224fbafae7486b36d33c518944da59788f2a9c
5
5
  SHA512:
6
- metadata.gz: 837dea47313de961f14a6f722a857a486c2f86d04ca9bc73b913fbba23a95cca2c4117106addf7eb2953df2a6bd028baf150695bd89d832f54ba02ba78cc16c5
7
- data.tar.gz: 5ccab009d5dcbf2c9b6a0fd81df2a6ae6429531f09c9cd38c6a00128f339d5524cbeb55132925a0c10c7505c526efc3c787e8b0b2f874221ba8a71b4c0a9024b
6
+ metadata.gz: 8efdce5484dc4bb780c04aefde6116ee82f9bf37d9d828320d6daaf0a816d625383234bd90ac47508508a9a356a0b26fe73e6a69bc54df47d81ed24294124bdc
7
+ data.tar.gz: d045f4348c13ff376dcf05ad07ce1e4894ee356e9caf625bf27bbca3494a648f0f95d8a90326a6e58c228244c83b452884c79a315864bbc3dc0e10042aadaec0
data/lib/themoviedb.rb CHANGED
@@ -10,5 +10,5 @@ end
10
10
  end
11
11
 
12
12
  module Tmdb
13
- VERSION = "0.0.14"
13
+ VERSION = "0.0.15"
14
14
  end
@@ -121,6 +121,7 @@ module Tmdb
121
121
  #Get the similar movies for a specific movie id.
122
122
  def self.similar_movies(id, conditions={})
123
123
  search = Tmdb::Search.new("/#{self.endpoints[:singular]}/#{self.endpoint_id + id.to_s}/similar_movies")
124
+ search.filter(conditions)
124
125
  search.fetch_response['results']
125
126
  end
126
127
 
@@ -140,5 +141,11 @@ module Tmdb
140
141
  search.fetch_response
141
142
  end
142
143
 
144
+ #Get the credits for a specific movie id.
145
+ def self.credits(id, conditions={})
146
+ search = Tmdb::Search.new("/#{self.endpoints[:singular]}/#{self.endpoint_id + id.to_s}/credits")
147
+ search.fetch_response
148
+ end
149
+
143
150
  end
144
151
  end
data/spec/movie_spec.rb CHANGED
@@ -109,6 +109,12 @@ describe Tmdb::Movie do
109
109
  @movie.changes(5).should be_true
110
110
  end
111
111
  end
112
+
113
+ it "should return credits for an ID" do
114
+ VCR.use_cassette 'movie/credits_for_id' do
115
+ @movie.credits(5).should be_true
116
+ end
117
+ end
112
118
  end
113
119
 
114
120
  describe "For a movie detail" do
data/spec/tv_spec.rb CHANGED
@@ -34,6 +34,22 @@ describe Tmdb::TV do
34
34
  it { should respond_to field }
35
35
  end
36
36
 
37
+ describe "For Chuck it should return images" do
38
+ before(:each) do
39
+ VCR.use_cassette 'tv/test_chuck' do
40
+ @tv = Tmdb::TV.images(1404)
41
+ end
42
+ end
43
+
44
+ it "should return backdrops for chuck" do
45
+ @tv['backdrops'].length.should >= 1
46
+ end
47
+
48
+ it "should return posters for chuck" do
49
+ @tv['posters'].length.should >= 1
50
+ end
51
+ end
52
+
37
53
  describe "For a TV detail" do
38
54
 
39
55
  before(:each) do
@@ -47,7 +63,7 @@ describe Tmdb::TV do
47
63
  end
48
64
 
49
65
  it "should return a backdrop" do
50
- @tv.backdrop_path.should == "/dRaV8HGx7Z9xmw77qSs8prp5OuI.jpg"
66
+ @tv.backdrop_path.should == "/8STVFl9kvWtFAydXUFHIUvT47AA.jpg"
51
67
  end
52
68
 
53
69
  it "should return a created date" do
@@ -111,7 +127,7 @@ describe Tmdb::TV do
111
127
  end
112
128
 
113
129
  it "should return a popularity rating" do
114
- @tv.popularity.should == 9.23244532629376
130
+ @tv.popularity.should == 6.60821276854239
115
131
  end
116
132
 
117
133
  it "should return a poster" do
@@ -119,7 +135,7 @@ describe Tmdb::TV do
119
135
  end
120
136
 
121
137
  it "should return seasons" do
122
- @tv.seasons.should == [{"air_date"=>"2009-02-17", "poster_path"=>"/AngNuUbXSciwLnUXtdOBHqphxNr.jpg", "season_number"=>0}, {"air_date"=>"2008-01-20", "poster_path"=>"/2lhO5zd1nnf7PjC7dGCUo45Volz.jpg", "season_number"=>1}, {"air_date"=>"2009-03-08", "poster_path"=>"/mYsNUgov0AtEnwpNeopj1lgMTf2.jpg", "season_number"=>2}, {"air_date"=>"2010-03-21", "poster_path"=>"/vxoZzDLMwxpuR5i5z4qSIU4LShE.jpg", "season_number"=>3}, {"air_date"=>"2011-07-17", "poster_path"=>"/dzZKSFsV6fREiSCYRj9NPFY4ggd.jpg", "season_number"=>4}, {"air_date"=>"2012-07-15", "poster_path"=>"/8bnD50mYDcoYER5ZcarjBGgAEb6.jpg", "season_number"=>5}]
138
+ @tv.seasons.should == [{"air_date"=>"2009-02-17", "poster_path"=>"/AngNuUbXSciwLnUXtdOBHqphxNr.jpg", "season_number"=>0}, {"air_date"=>"2008-01-20", "poster_path"=>"/dHCYpEoHEjAV6Xt3eyNthkdLRl3.jpg", "season_number"=>1}, {"air_date"=>"2009-03-08", "poster_path"=>"/rCdISteF1GPvPsy0a5L0LDffjtP.jpg", "season_number"=>2}, {"air_date"=>"2010-03-21", "poster_path"=>"/vxoZzDLMwxpuR5i5z4qSIU4LShE.jpg", "season_number"=>3}, {"air_date"=>"2011-07-17", "poster_path"=>"/y4UJMKqfgDHLKDTp5uOe9oZWYnr.jpg", "season_number"=>4}, {"air_date"=>"2012-07-15", "poster_path"=>"/ih1JKNxEzW56azeFpEQmdu4poA4.jpg", "season_number"=>5}]
123
139
  end
124
140
 
125
141
  it "should return a status" do
@@ -127,11 +143,11 @@ describe Tmdb::TV do
127
143
  end
128
144
 
129
145
  it "should return a vote average" do
130
- @tv.vote_average.should == 8.83333333333333
146
+ @tv.vote_average.should == 8.86764705882353
131
147
  end
132
148
 
133
149
  it "should return a vote count" do
134
- @tv.vote_count.should == 24
150
+ @tv.vote_count.should == 34
135
151
  end
136
152
 
137
153
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: themoviedb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.14
4
+ version: 0.0.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ahmet Abdi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-26 00:00:00.000000000 Z
11
+ date: 2014-01-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty