|
|
@ -1,4 +1,15 @@
|
|
1
|
1
|
// `unpaginate` unpaginates json resources.
|
|
|
2
|
//
|
|
|
3
|
// The requested resource is assumed to return an array of JSON
|
|
|
4
|
// objects. `unpaginate` prints a new array containing the JSON
|
|
|
5
|
// objects from all pages on stdout.
|
|
|
6
|
//
|
|
|
7
|
// Pagination is assumed to be in the format that the GitHub v3
|
|
|
8
|
// API uses:
|
|
|
9
|
//
|
|
|
10
|
// HTTP/1.1 200 OK
|
|
|
11
|
// ...
|
|
|
12
|
// Link: <https://api.github.com/user/527119/repos?per_page=42&page=2>; rel="next", <https://api.github.com/user/527119/repos?per_page=42&page=2>; rel="last"
|
|
2
|
13
|
package main
|
|
3
|
14
|
|
|
4
|
15
|
import (
|