Skip to content

Conversation

@johndoknjas
Copy link

@johndoknjas johndoknjas commented Oct 21, 2024

Updates three functions to have optional parameters, enabling the user to set values for query params of three study endpoints. The large number of added lines is mostly due to formatting with black.

Checklist when adding a new endpoint
  • Added new endpoint to the README.md
  • Ensure that my endpoint name does not repeat the name of the client. Wrong: client.users.get_user(), Correct: client.users.get()
  • Typed the returned JSON using TypedDicts in berserk/types/, example
  • Tested GET endpoints not requiring authentification. Documentation, example
  • Added the endpoint and your name to CHANGELOG.md in the To be released section (to be created if necessary)

@benediktwerner
Copy link
Member

Thanks! You can directly set query params by passing params={"a": a} to get though. Then there's no need for the append_query_params function and manually encoding the params.

@johndoknjas
Copy link
Author

@benediktwerner Thanks for letting me know, I've updated the PR to do this.

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

Successfully merging this pull request may close these issues.

2 participants