Open harshulsahni opened 2 years ago
@harshulsahni Why do you want to use more than one API Key?
@celiao I don't want to use more than one API key, but rather I would like the endpoint functions (e.g. search.movie()
) to be used without having to define the API key at the top of some file. It would be much cleaner (in my opinion) to have the API key defined in the arguments of these functions so they can be more modular.
the
_get_params
function only relied ontmdb.API_KEY = ...
to set an API key. This PR aims to add functionality so that the user can specify an API key in every function to eliminate this global dependency.See the test
test_tmdb_get_params_no_api_with_search
intest_base.py
for example usage.Also, this PR simplifies some boolean and string logic to for conciseness.