Closed b-rockx closed 7 years ago
I've managed to solve the issue myself and will fork it sometime this week.
fix is to add a param to the client.py file parms_map dictionary.
'apikey' : 'api',
Then set the param
`title = omdb() title.set_default('api', 'keygoeshere')
print(title.imdbid('tt0279077'))`
That approach sounds good. I'd probably just stick with just apikey
as the name though.
For others coming here for a workaround with the current version, you can do:
Using the module level omdb client:
import omdb
omdb.api._client.params_map['apikey'] = 'apikey'
omdb.set_default('apikey', 'myapikey')
Using an separate instance of the omdb client:
from omdb import Client
params_map = Client.params_map.copy()
params_map['apikey'] = 'apikey'
class OMDBClient(Client):
params_map = params_map
# if on Python 3.5+
#class OMDBClient(Client):
# params_map = {**Client.params_map, **{'apikey': 'apikey'}}
omdb = OMDBClient(apikey='myapikey')
Implemented via #12
omdb requires a private api key now. Please add support.