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

Re-work the architecture #37

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Conversation

unflores
Copy link
Contributor

@unflores unflores commented Apr 30, 2022

I was thinking that different resources would probably change together. Repositories, Builds, Users, and it may be nice to have them co-located. It would allow the splitting of tests too.
This might be a nice change

This would give us an api like the following:

client.repositories.get('drone', 'drone-node')
client.repositories.enable('drone', 'drone-node')
client.repositories.disable(drone', 'drone-node')

I don't think we would be able to do that without breaking changes. We could do something like this though:

  1. Finish adding the specs for all of the endpoints
  2. Move resources such as Repositories into their own folder.
  3. Add Object.setPrototypeOf(Client.prototype, Repositories.prototype) to client. This would allow 2. to be non-breaking.
  4. Change interface of resources, remove setPrototypeOf and bump major version.

This is probably more than you want to take on, but I thought it was a cool idea and figured I would communicated it nonetheless.

@unflores unflores changed the title Move validations to their own file Re-work the architecture Apr 30, 2022
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.

1 participant