routes
routes copied to clipboard
Flag routes with paginated responses that have a result namespace
Ref https://github.com/octokit/rest.js/issues/1161
Affected routes
- [ ] https://developer.github.com/v3/search/#example (key
items) - [ ] https://developer.github.com/v3/checks/runs/#list-check-runs-for-a-specific-ref (key:
check_runs) - [ ] https://developer.github.com/v3/checks/runs/#list-check-runs-in-a-check-suite (key:
check_runs) - [ ] https://developer.github.com/v3/checks/suites/#list-check-suites-for-a-specific-ref (key:
check_suites) - [ ] https://developer.github.com/v3/apps/installations/#list-repositories (key:
repositories) - [ ] https://developer.github.com/v3/apps/installations/#list-repositories-accessible-to-the-user-for-an-installation (key:
repositories) - [ ] https://developer.github.com/v3/actions/artifacts/#list-workflow-run-artifacts (key:
artifacts) - [ ] https://developer.github.com/v3/actions/secrets/#list-secrets-for-a-repository (key:
secrets) - [ ] https://developer.github.com/v3/actions/workflows/#list-repository-workflows (key:
workflows) - [ ] https://developer.github.com/v3/actions/workflow_jobs/#list-jobs-for-a-workflow-run (key:
workflow_jobs) - [ ] https://developer.github.com/v3/actions/workflow_runs/#list-workflow-runs (key:
workflow_runs) - [ ] https://developer.github.com/v3/actions/workflow_runs/#list-repository-workflow-runs (key:
workflow_runs)
Make sure to not accidentally include, it’s not a response which paginates
- [ ] https://developer.github.com/v3/repos/statuses/#get-the-combined-status-for-a-specific-ref
Example
Search repositories.
Instead of just responding with "items" in the response body root, the response body has 3 keys: total_count, incomplete_result and items.
{
"total_count": 40,
"incomplete_results": false,
"items": [
{
"id": 3081286,
"node_id": "MDEwOlJlcG9zaXRvcnkzMDgxMjg2",
"name": "Tetris",
"full_name": "dtrupenn/Tetris",
"owner": {
"login": "dtrupenn",
"id": 872147,
"node_id": "MDQ6VXNlcjg3MjE0Nw==",
"avatar_url": "https://secure.gravatar.com/avatar/e7956084e75f239de85d3a31bc172ace?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
"gravatar_id": "",
"url": "https://api.github.com/users/dtrupenn",
"received_events_url": "https://api.github.com/users/dtrupenn/received_events",
"type": "User"
},
"private": false,
"html_url": "https://github.com/dtrupenn/Tetris",
"description": "A C implementation of Tetris using Pennsim through LC4",
"fork": false,
"url": "https://api.github.com/repos/dtrupenn/Tetris",
"created_at": "2012-01-01T00:31:50Z",
"updated_at": "2013-01-05T17:58:47Z",
"pushed_at": "2012-01-01T00:37:02Z",
"homepage": "",
"size": 524,
"stargazers_count": 1,
"watchers_count": 1,
"language": "Assembly",
"forks_count": 0,
"open_issues_count": 0,
"master_branch": "master",
"default_branch": "master",
"score": 10.309712
}
]
}
I think I would set x-github.paginates to either true or the name of the property that holds the array