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

Revamp suggestions #150

Open
4 tasks
simonbyrne opened this issue Oct 30, 2019 · 0 comments
Open
4 tasks

Revamp suggestions #150

simonbyrne opened this issue Oct 30, 2019 · 0 comments

Comments

@simonbyrne
Copy link
Collaborator

simonbyrne commented Oct 30, 2019

Having tried using this package, here are a grab bag of suggestions for how it might be improved:

  • get rid of Dicts where possible, e.g. by parsing JSON directly to relevant objects (e.g. using JSON2/JSON3)
  • have pagination be handled as a lazy iterator
  • move interface away from shallow wrapper over requests
    • positional arguments should be true options (e.g. as options to GET requests)
    • when passing objects (for POST/PATCH reqs), should be positional argument
      • for PATCH reqs, many APIs pass an id as a path, and the rest of the object as a parameter: these could be combined on the Julia side, e.g. edit_issue(repo, issue; param=issue) could just be edit_issue(repo, issue).
    • move auth (and possibly headers) into GitHubAPI object, since a common auth will typically be used by all requests
  • create mock tests, using either

Thoughts?

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

1 participant