You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Damn, I forgot to watch this repo, sorry for the late response....
Some time ago I was experimenting with creating some abstract classes that contain the properties for the returned json data.
Those classes can be generated using this file that contains all the return objects and their properties: https://github.com/github/developer.github.com/blob/master/lib/resources.rb
I helped flesh out a Stripe PHP API where we had value objects for the returned json data. It uses JMSerializer and Doctrine Annotations to fill the value object, and it gives you nice camelCased method names instead. :P
Looks like a nice concept. As far as I can see, it would require passing the class name to our processResponse() method so the JSON data can be properly deserialized. (I didn't knew about the serializer script - I think it is the JM_S_Serializer? - nice)
CamelCase properties also look better then under_scored ones in the PHP world. The only concern I have here is that we would move away from the GitHub API and it's wonderful documentation and, of course, there will be a huge b/c break..
What about a "simple" auto complete using dumb classes with public properties which are used only as the return type in the method doc blocks?
See conversation here:
http://www.reddit.com/r/PHP/comments/1zix9k/github_api_client_feedback_welcome/cfuym7r
The text was updated successfully, but these errors were encountered: