Skip to content

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