datadotworld / data.world-py

Python package for data.world
https://data.world/integrations/python
Apache License 2.0
102 stars 28 forks source link

Fixing references to api_client #104

Closed laconc closed 5 years ago

laconc commented 6 years ago

The docs suggest that an api client can be called as such: client = dw.api_client(). That gave us the issue: TypeError: 'RestApiClient' object is not callable.

Looking at https://github.com/datadotworld/data.world-py/blob/master/datadotworld/datadotworld.py#L59, the correct way to use it appears to be: client = dw.api_client, since it's an attribute and not a function. Making that change resolved my issue.

laconc commented 6 years ago

The tests are failing but I assume that's unrelated to this PR since all I'm changing is the README.