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
Create v2.0 of the library #34
Conversation
7f8a0a5
to
d302d38
Compare
@eporama @q0rban @timmillwood I know that you have been fairly active in this library. It'd be great to get some views from yourselves on this approach as it attempts to reduce the amount of code in each class (rather than having one mega client class we can use individual ones for each endpoint). This would be a completely API breaking change, so if merged, I'd be cutting a 2.0 release for this. |
a9a7a28
to
f454daf
Compare
I'm all for this approach as I drastically prefer being able to say things about the objects instead of just the client. I am curious if it would be beneficial to go one level deeper and define the classes based on the objects instead of just on the endpoints. example: instead of just a I think something like:
or
|
I've thought about breaking it down further, especially since environments has so many endpoints that it really shouldn't just be one class. An example of this might be to split out things like crons and SSL certificates into their own top level class which then either translates to an environment endpoint or extends the Environments class. That said, I'm totally unsure of whether this would be a best practice or would couple things too closely.
I quite like what you've proposed as it seems clean and simple to use as a library consumer, do you know off the top of your head if this would impact testing/dependency injection at all? |
After just adding the notification class, I think it doesn't make sense to align to Acquia's endpoints with classes. The latest addition shows that when we're getting one notification vs all, we have to load different classes. Getting a single notification
Getting all notifications
To me, it would be more logical to have one Potential method
We could potentially also implement a CloudApi interface with common methods (get, getAll, create, delete etc) |
This still needs more work - @eporama does this look on the right track to you? One I'm not sure where to put would be the code tasks. I've put deploy/switch/getBranches into their own class but they could also probably live in Environments. |
This has now been merged back into master. |
…oint classes.