Replies: 4 comments 2 replies
-
Thanks for the suggestion. I'm already starting to think about refactoring the class but the downside will be that it will probably break the class into multiple files making it more difficult for people to include it in their projects without using composer. We could then also add an Interface (I think) which adapts to the controller version and throws an Exception when a route is no longer supported. That being said we already trigger errors (not so clean I know but that came with the heritage of the class) for methods/functions that no longer exist or have been renamed. If you have any other ideas for a full refactoring of the class I'm open to suggestions. |
Beta Was this translation helpful? Give feedback.
-
I’m definitely interested in taking a deeper look at the code, maybe this coming weekend. I’ll let you know if I have any additional suggestions.
It ain't easy being green! Please recycle.
… On Mar 30, 2021, at 8:19 AM, malle-pietje ***@***.***> wrote:
Thanks for the suggestion. I'm already starting to think about refactoring the class but the downside will be that it will probably break the class into multiple files making it more difficult for people to include it in their projects without using composer. We could then also add an Interface (I think) which adapts to the controller version and throws an Exception when a route is no longer supported.
That being said we already trigger errors (not so clean I know but that came with the heritage of the class) for methods/functions that no longer exist or have been renamed.
If you have any other ideas for a full refactoring of the class I'm open to suggestions.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Beta Was this translation helpful? Give feedback.
-
IMHO the biggest challenge is to logically group and name the end points. Chaining methods would also make it easier and more intuitive to use the API client. Something like:
And of course introduce Exceptions for specific responses but also to wrap cURL errors. |
Beta Was this translation helpful? Give feedback.
-
I think the first thing I'd do is create a version 2, and tempt users into migrating to it, while maintaining version 1, but give version 1 an EOL. That would be a first step in a version 2: update the dev-env, introduce tests, and extract all configuration. |
Beta Was this translation helpful? Give feedback.
-
I noticed at the end of the readme it says that not all functions might be available in the future.
There are 2 ways to combat this:
Just a thought. Thanks for the awesome code, just what I was looking for.
Beta Was this translation helpful? Give feedback.
All reactions