(data)
| 488 | } |
| 489 | |
| 490 | followPaginate(data) { |
| 491 | return new Promise((resolve, reject) => { |
| 492 | getGitHubJSON(data.url, data.accessToken) |
| 493 | .then((response, status, xhr) => { |
| 494 | data.items = data.items.concat(response); |
| 495 | const link = xhr.getResponseHeader('Link'); |
| 496 | let url = null; |
| 497 | if (link) { |
| 498 | const match = link.match(/.*<(.*?)>; rel="next"/); |
| 499 | url = match && match[1] ? match[1] : null; |
| 500 | } |
| 501 | resolve({ |
| 502 | items: data.items, |
| 503 | url: url, |
| 504 | accessToken: data.accessToken |
| 505 | }); |
| 506 | }) |
| 507 | .fail(reject); |
| 508 | }); |
| 509 | } |
| 510 | } |
nothing calls this directly
no test coverage detected