AnthonyBloomer / tmdbv3api

A lightweight Python library for The Movie Database (TMDb) API. The TMDb API is a resource for developers to integrate movie, TV show and cast data along with posters or movie fan art.
http://anthonybloomer.github.io/tmdbv3api/.
220 stars 51 forks source link

No function for "find external_id" in the package #89

Closed adarshX closed 3 years ago

adarshX commented 3 years ago

There is no function to find the tmdbv id from an external id like IMDB id. But the actual API has a get function for this known by "find external_id" (here) So is it possible to add this function to this package?

Refer: https://developers.themoviedb.org/3/find/find-by-id

meisnate12 commented 3 years ago

It's there its just not called find or anything like that heres how you can use it

import tmdbv3api

tmdbv3api.TMDb().api_key = "YOUR_API_KEY"
tmdbv3api.TMDb().language = "en"

# Gets external IDs using the TMDb ID (https://developers.themoviedb.org/3/movies/get-movie-external-ids)
print(tmdbv3api.Movie().external_ids(603))

# Gets a whole movie object from an External ID (https://developers.themoviedb.org/3/find/find-by-id)
print(tmdbv3api.Movie().external(external_id="tt0133093", external_source="imdb_id"))

using tmdbv3api.Movie().external with an imdb id for a tv show will still return the correct result with a show object under tv_results