Find a work
Using the API
Endpoints
API endpoints start with /api.
/users
/works
Get all works in the database. It does not update their data.
/works/find
Find works with their ID or slug in a remote data source. If they don’t exist in our database, they will be added for a faster query next time (unless it’s been some time and the data needs to be updated).
| Parameter | Description |
|---|
source | a data source name, case-sensitive |
id | string (if !slug) to find works by ID |
slug | string (if !id) to find works by slug if the data source supports slugs |
Example: /api/works/find?source=TMDB&id=501,502
Data sources
Data sources are external websites we get our data from. They are identified by a SourceName and can have different features available:
| Name | Find by ID | Find by slug | Bulk query* |
|---|
IGDB | yes | yes | yes |
TMDB | yes | no | no (tbd) |
OpenLibrary | ISBN, OLID…† | no | no (tbd) |
* Bulk query means that when given multiple IDs or slugs, all the works will be obtained from a single query to the source. When bulk query is not available, each work will be queried sequentially from the source, increasing the number of requests, which could lead to timeout and rate limit errors.
† OpenLibrary books are not tied to a single identifier, but multiple: an ISBN, an OpenLibrary
ID (OLID), and more. Any of these can be used to retrieve a book.
Models
User
| id |
String
|
| name |
String
|
| email |
String
|
| createdAt |
DateTime
|
Work
| id |
String
|
| slug |
String
|
| type |
WorkType
|
| sources |
Source
[]
|
| title |
String
|
| authors |
String
[]
|
| publishers |
String
[]
|
| date |
Json
(optional)
|
| status |
WorkStatus
(optional)
|
| homepage |
String
(optional)
|
| socials |
String
[]
|
| covers |
Picture
[]
|
| screenshots |
Picture
[]
|
| createdAt |
DateTime
|
| updatedAt |
DateTime
|
Source
Picture
| id |
String
|
| language |
Lang
(optional)
|
| order |
Int
|
| images |
Image
[]
|
| createdAt |
DateTime
|
| updatedAt |
DateTime
|
| coverOf |
Work
(optional)
|
| screenshotOf |
Work
(optional)
|
Image
| id |
String
|
| url |
String
|
| width |
Int
(optional)
|
| height |
Int
(optional)
|
| picture |
Picture
|
Enums
WorkType
| VideoGame |
| Movie |
| TvShow |
| Book |
SourceName
Lang