(fullName, nextPageUrl)
| 88 | // Fetches a page of stargazers for a particular repo. |
| 89 | // Relies on the custom API middleware defined in ../middleware/api.js. |
| 90 | const fetchStargazers = (fullName, nextPageUrl) => ({ |
| 91 | fullName, |
| 92 | [CALL_API]: { |
| 93 | types: [ STARGAZERS_REQUEST, STARGAZERS_SUCCESS, STARGAZERS_FAILURE ], |
| 94 | endpoint: nextPageUrl, |
| 95 | schema: Schemas.USER_ARRAY |
| 96 | } |
| 97 | }) |
| 98 | |
| 99 | // Fetches a page of stargazers for a particular repo. |
| 100 | // Bails out if page is cached and user didn't specifically request next page. |