-
Notifications
You must be signed in to change notification settings - Fork 0
Seasons
Henrique Tedeschi edited this page May 31, 2020
·
2 revisions
For this section, you will find all information to use seasons
.
Make sure you have included the Authorization header with your token to use the API properly. To request a Token go to parksandrecapi.com and follow the steps to request one.
Header | Required | Values/Examples |
---|---|---|
Authorization | Required | Bearer {token} |
Method | Endpoint |
---|---|
GET | /api/v1/seasons |
GET | /api/v1/seasons/{season} |
GET | /api/v1/seasons/ping |
When reaching this endpoint, the response will be like this:
[
{
"season": "1",
"episodes": [
{
"number_overall": 1,
"number_season": 1,
"title": "Pilot",
"directed_by": "Greg Daniels",
"written_by": "Greg Daniels & Michael Schur",
"air_date": "2009-04-09T06:00:00.000Z",
"viewers": 6770000
},
{
"number_overall": 2,
"number_season": 2,
"title": "Canvassing",
"directed_by": "Seth Gordon",
"written_by": "Rachel Axler",
"air_date": "2009-04-16T06:00:00.000Z",
"viewers": 5920000
},
...
],
"first_aired": "2009-04-09T06:00:00.000Z",
"last_aired": "2009-05-14T06:00:00.000Z",
"rank": 96,
"viewers": 6000000,
"__v": 0
},
...
]
Parameters to be included:
Parameter | Type | Required | Example |
---|---|---|---|
season | string | optional | "1" or "special" |
When reaching this endpoint, the response will be like this:
[
{
"season": "1",
"episodes": [
{
"number_overall": 1,
"number_season": 1,
"title": "Pilot",
"directed_by": "Greg Daniels",
"written_by": "Greg Daniels & Michael Schur",
"air_date": "2009-04-09T06:00:00.000Z",
"viewers": 6770000
},
{
"number_overall": 2,
"number_season": 2,
"title": "Canvassing",
"directed_by": "Seth Gordon",
"written_by": "Rachel Axler",
"air_date": "2009-04-16T06:00:00.000Z",
"viewers": 5920000
},
...
],
"first_aired": "2009-04-09T06:00:00.000Z",
"last_aired": "2009-05-14T06:00:00.000Z",
"rank": 96,
"viewers": 6000000,
"__v": 0
},
...
]
When reaching this endpoint, the response will be like this:
{
"success": true,
"date": "2020-05-31T19:31:15.522Z"
}
Created by Henrique Tedeschi. See the Disclaimer.