Skip to content

Instantly share code, notes, and snippets.

@toddzebert
Created March 27, 2017 04:13
Show Gist options
  • Save toddzebert/23685346122169c5e63ae9d51c0e21bd to your computer and use it in GitHub Desktop.
Save toddzebert/23685346122169c5e63ae9d51c0e21bd to your computer and use it in GitHub Desktop.
"main" code that wraps all the individual promise steps together
// requires https://gist.github.com/toddzebert/135578e9faf006b73656c360b7e616e2
// requires https://gist.github.com/toddzebert/c9d75cd901897e7363bf142a90a2b2a1
// requires https://gist.github.com/toddzebert/bcd849a48676256eef8a795f8f03cfff
// requires https://gist.github.com/toddzebert/43c308b0e0f559b47ac487dcc8c06924
// requires https://gist.github.com/toddzebert/5d279f8a2104bef103273e5177ae3599
var data = { id: 4 };
getAuth(data)
.then(getProfile)
.then(getFeed)
.then(getPosts)
.then(getAds)
.then(data => console.log('final data: ', data));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment