Open Korbeil opened 6 years ago
Regarding DTO: I use https://github.com/jenssegers/model when I want things like this, but I do use laravel on my sites. So not sure how you'd feel about that.
General Thoughts: For the DTO, it would be nice to have helper methods to group the constants as well. Something like pve()/pvp() etc.
Thanks for commenting !
About the lib you linked, we can't really use it since it's only Laravel-related and I would prefer to make a more generic client. In future we could make bridge to Laravel/Symfony or other frameworks if needed :)
About helpers I totaly agree ! I'll try to make a draft model / serializer with Profile API this week to let you see how you could do this ;)
Finally last step to make dev-master
clean again :+1: (and unit tests running as they should be :wink:)
I only made simple models for all endpoints, there must be some possible improvement (and even more for StatisticApi
endpoint)
@stygiansabyss if you want to take a look at all theses and try something you're free to go ! :wink:
Use Symfony Serializer to parse data from API and create DTO for each API endpoint. The idea is to bring a strong typed model with utility functions to be able to access all data easily.
Endpoints to update:
Resources: