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

Clarify that the project argument to client.documents.upload and client.documents.upload_directory is the project ID #120

Open
ghing opened this issue Aug 16, 2018 · 2 comments

Comments

@ghing
Copy link

@ghing ghing commented Aug 16, 2018

From the API documentation, it's not clear that project is the project ID. Since there's a Project class, I originally thought this was the type expected for this argument. As seen in #80, others have been confused about whether this argument is the project ID or title.

If there's a style of documenting argument types/meaning that you like, I'm happy to submit a pull request.

@ghing ghing changed the title Clarify that the `project` argument to `client.documents.upload` and `client.documents.upload_directory` is the project ID. Clarify that the project argument to client.documents.upload and client.documents.upload_directory is the project ID Aug 16, 2018
@palewire
Copy link
Member

@palewire palewire commented Aug 16, 2018

This is a good point. TBH, the whole project handling bit of this library could use some work.

@ghing
Copy link
Author

@ghing ghing commented Aug 17, 2018

I hadn't used this library in a while and found it pretty intuitive, except for the expected type or the project argument. I think it's worth a quick documentation fix to ease the pain of other users (or future me).

One interesting thing that I realized is that if you changed the __str__ implementation of Project to return the id instead of the title, then you could pass a Project argument to upload and it would work. But, I don't know if it's a good idea to break the behavior of the string representation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.