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
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
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
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
### Passing Data down an effects chain for multiple API Calls using Observable.ForkJoin
#### Purpose
This recipe is useful for cooking up chained API calls as a result of a single action.
#### Description
In the below example, a single action called `POST_REPO` is dispatched and it's intention is to create a new repostiory on GitHub then update the README with new data after it is created.
For this to happen there are 4 API calls necessary to the GitHub API:
1. POST a new repostiry
2. GET the master branch of the new repository
3. GET the files on the master branch
4. PUT the `README.md` file
The `POST_REPO`'s payload contains `payload.repo` with information needed for API call 1.
The response from API call 1 is necessary for API call 2.
The response from API call 2 is necessary for API call 3.
The response from API call 3 and `payload.file`, which has information needed to update the README.md file, is neccessary for API call 4.