Created
May 15, 2014 14:50
-
-
Save andyfowler/3a25f905e51308a71d7b to your computer and use it in GitHub Desktop.
response classes https://twitter.com/juantreminio/status/466943547309305859
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$response = $aboutmeApi->get(); | |
$response->getPage(); // returns `Aboutme_Page` created from API response JSON | |
// no API consumer needs to know about AboutMe's API structure, only your own implemented methods. | |
$page->getFirstName(); | |
$page->getBio(); | |
// in testing | |
$page = Aboutme_Page::createFromResponse($yourfixture); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment