https://github.com/code-shoily/airdates_api
GraphQL API layer over data queried from http://airdates.tv
https://github.com/code-shoily/airdates_api
Last synced: 7 months ago
JSON representation
GraphQL API layer over data queried from http://airdates.tv
- Host: GitHub
- URL: https://github.com/code-shoily/airdates_api
- Owner: code-shoily
- Created: 2018-07-13T23:57:44.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-07-15T07:35:33.000Z (almost 8 years ago)
- Last Synced: 2024-12-29T02:31:43.103Z (over 1 year ago)
- Language: Elixir
- Homepage:
- Size: 43 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# AirdatesApi
A simple program that fetches the data from [airdates.tv](http://airdates.tv), parses the data and puts it in a GraphQL queriable format.
## Usage
### Installation
You need Elixir installed to run this one (duh!). [Follow this link](https://elixir-lang.org/install.html) to do so if you haven't already.
- Clone this repository
- `mix run --no-halt`
- Go to `http://localhost:4001/`
- Interact with Graphiql
- Follow the schema docs from the playground
### Query examples

To list all shows:
```
{
shows {
id
title
date
}
}
```
Optionally, you can sort by `TITLE` by putting `shows(sortBy:TITLE)`. You can do the same with `DATE`.
To list all dates for "The 100"
```
{
shows(title:"The 100") {
id
title
date
}
}
```
`shows(title:"The 100", episode:"S05E08")` will give you the info of "The 100"-s episode 8 of season 5.
Note that you can put one of `title`, `date`, `id`, `seriesId`, or `sortBy`.
`episode` can only be used with `title` as a co-arg.
### Mutation Examples
You can re-fetch all the dates from [airdates.tv](http://airdates.tv) by running the following mutation:
```
mutation {
reload {
id
}
}
```