Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api.ok resource parameter cannot actually be a string #316

Closed
skelliest opened this issue Jul 22, 2020 · 2 comments
Closed

api.ok resource parameter cannot actually be a string #316

skelliest opened this issue Jul 22, 2020 · 2 comments

Comments

@skelliest
Copy link

According to the docstring, the resource parameter to the api.ok method can be a string, presumably something like api.ok('dataset/531634203851d61f730accad').

resource: (string|map) Resource ID or structure

This results in an error TypeError: string indices must be integers, so the documentation on this function probably just needs to change. You can get the same functionality with

dataset = api.get_dataset('dataset/531634203851d61f730accad')
api.ok(dataset)
@mmerce
Copy link
Member

mmerce commented Jul 22, 2020

@skelliest Thanks for the feedback! It is indeed an error in the docs. We'll be correcting it in next version.

@mmerce
Copy link
Member

mmerce commented Aug 3, 2020

Te docstring has been updated in version 5.0.0. Thanks again for the heads up.

@mmerce mmerce closed this as completed Oct 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants