ponyapi/README.md

53 lines
1.5 KiB
Markdown
Raw Normal View History

2015-08-09 19:48:49 +00:00
PonyAPI
=======
2015-08-09 20:36:30 +00:00
A simple API for episodes of My Little Pony: Friendship is Magic to be run
2015-08-09 19:48:49 +00:00
inside a container.
2015-08-09 20:36:30 +00:00
API Usage
---------
An episode will have the following data type:
```json
{
"air_date": 1286735400,
"episode": 1,
"is_movie": false,
"name": "Friendship is Magic Part 1",
"season": 1
}
```
This represents Season 1, Episode 1 of My Little Pony: Friendship Is Magic. The
`air_date` column represents the date and time that the episode was originally
shown on The Hub (now Discovery Family Network). If `is_movie` is set and the
season number is `99`, the episode record should be treated as a movie.
### `/all`
Returns all information about all episodes. This returns an array of Episode
objects as defined above.
### `/season/<number>`
Returns all information about episodes in the given season number or a `404`
reply if no episodes could be found. To get all information about the movies
shown, set the season as `99`.
### `/season/<number>/episode/<number`
Returns all information about the episode with the given season and episode
number. If the episode cannot be found, this will return a `404`.
### `/random`
Returns a random episode record from the list of episodes.
### `/search`
This must be given a query paramater `q` containing the text to search for. Not
including this will return a `406` reply. This will search the list of episode
records for any episodes whose names match the given search terms. This is
case-insensitive. If no episodes can be found, this will return a `404` reply.