drone-node
drone-node copied to clipboard
Re-work the architecture
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 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:
- Finish adding the specs for all of the endpoints
- Move resources such as Repositories into their own folder.
- Add
Object.setPrototypeOf(Client.prototype, Repositories.prototype)to client. This would allow 2. to be non-breaking. - 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.