-
-
Save robwormald/e01ba2035c853fed4c42 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
//returns array of users | |
function getUser(){ | |
return fetch('user.json'); | |
} | |
function getAccountsForUser(user){ | |
return fetch(`users/${user.id}/accounts`); | |
} | |
function getPropertiesForAccount(account){ | |
return fetch(`accounts/${account.id}/properties`); | |
} | |
function getProfilesForProperty(property){ | |
return fetch(`props/${property.id}/profiles`); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment