celiao / tmdbsimple

A wrapper for The Movie Database API v3.
GNU General Public License v3.0
579 stars 122 forks source link

List of genres #82

Closed AtomicNess123 closed 2 years ago

AtomicNess123 commented 3 years ago

I can't seem to find how to list all genres with their ID. tmdb.Genres.movie_list(language='en')is supposed to do the job, but it won't.

Archmonger commented 3 years ago

This question does not contain enough information.

What do you receive when calling tmdb.Genres.movie_list(language='en')?

Additonally, this PR is a question, not a bug report. Can be closed @celiao

AtomicNess123 commented 3 years ago

I get this:

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-12-bb1c8af383f1> in <module>
----> 1 tmdb.Genres.movie_list(language='en')

TypeError: movie_list() missing 1 required positional argument: 'self'
Archmonger commented 3 years ago

@AtomicNess123 Genres is a class, and thus needs to be initialized.

The correct way of typing this would be tmdb.Genres().movie_list(language='en')

AtomicNess123 commented 3 years ago

Now it works. Im a newbie in Python. I just wrote what you told me to above, and there were no brackets. Now with the brackets, it works.

celiao commented 2 years ago

Thanks for your help, @Archmonger!