Skip to content
This repository has been archived by the owner on Jul 27, 2020. It is now read-only.

Flag routes with paginated responses that have a result namespace #329

Open
13 tasks
gr2m opened this issue Jan 3, 2019 · 1 comment
Open
13 tasks

Flag routes with paginated responses that have a result namespace #329

gr2m opened this issue Jan 3, 2019 · 1 comment
Labels
feature New feature or request
Projects

Comments

@gr2m
Copy link
Contributor

gr2m commented Jan 3, 2019

Ref https://github.com/octokit/rest.js/issues/1161

Affected routes

Make sure to not accidentally include, it’s not a response which paginates

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
    }
  ]
}
@d11n d11n assigned gr2m Aug 7, 2019
@gr2m
Copy link
Contributor Author

gr2m commented Feb 1, 2020

I think I would set x-github.paginates to either true or the name of the property that holds the array

@gr2m gr2m added the feature New feature or request label May 5, 2020
@gr2m gr2m added this to In progress in JS May 5, 2020
@gr2m gr2m removed their assignment May 5, 2020
@gr2m gr2m moved this from In progress to Features in JS May 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature New feature or request
Projects
No open projects
JS
  
Features
Development

No branches or pull requests

1 participant