Skip to content

Instantly share code, notes, and snippets.

@russellbodine
Last active June 30, 2017 13:30
Show Gist options
  • Save russellbodine/f784ec95a89fce331063e30824a6bbef to your computer and use it in GitHub Desktop.
Save russellbodine/f784ec95a89fce331063e30824a6bbef to your computer and use it in GitHub Desktop.
Meta Data

V1 API RESPONSE

"page_metadata": {

    "count": 5,

    "page": 1,

    "has_next_page": false,

    "has_previous_page": false,

    "next": null,

    "current": "https://dev-api.usaspending.gov/api/v1/random_endpoint,

    "previous": null

  },

  "req": "d90d5eabb7a",

  "results": [ 

    ......

  ]

VARS

METADATA VARS

count: a count of the query set. (not effected by limit)

page: a pagination var that indicates what page they are on

has_next_page: a pagination var that indicates if there are more pages

has_previous_page: a pagination var that indicates if there is a previous page

next: how to call the next page

current: current endpoint called

req: current request hash

results: results of the query

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment