Skip to content

Commit 4d2bd6b

Browse files
Add external id endpoint for movies (#60)
1 parent 5f22a92 commit 4d2bd6b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/themoviedb/movie.rb

+7
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ class Movie < Resource
55
# http://docs.themoviedb.apiary.io/#movies
66
@@fields = [
77
:adult,
8+
:external_ids,
89
:backdrop_path,
910
:belongs_to_collection,
1011
:budget,
@@ -99,6 +100,12 @@ def self.crew(id, _conditions = {})
99100
search.fetch_response["crew"]
100101
end
101102

103+
# Get the external ids for a specific movie id
104+
def self.external_ids(id, _conditions = {})
105+
search = Tmdb::Search.new("/#{endpoints[:singular]}/#{endpoint_id + id.to_s}/external_ids")
106+
search.fetch_response
107+
end
108+
102109
# Get the images (posters and backdrops) for a specific movie id.
103110
def self.images(id, _conditions = {})
104111
search = Tmdb::Search.new("/#{endpoints[:singular]}/#{endpoint_id + id.to_s}/images")

0 commit comments

Comments
 (0)