1748 lines
51 KiB
YAML
Executable File
1748 lines
51 KiB
YAML
Executable File
openapi: 3.0.0
|
||
info:
|
||
description: 'Access token should be sent along with every request to SITE_NAME API in authorization header: `Authorization: Bearer <Token>` <br> This token can either be acquired via `auth/login` endpoint or from account settings page on [SITE_NAME website](SITE_URL/account/settings).'
|
||
version: '1.0.0'
|
||
title: SITE_NAME API
|
||
security:
|
||
- accessToken: []
|
||
tags:
|
||
- name: Titles
|
||
- name: Episodes
|
||
- name: People
|
||
- name: News
|
||
- name: Search
|
||
- name: Lists
|
||
- name: Users
|
||
- name: Reviews
|
||
- name: Auth
|
||
description: Authenticate requests to the API
|
||
paths:
|
||
/titles:
|
||
get:
|
||
tags:
|
||
- Titles
|
||
summary: Browse movies and series
|
||
operationId: getAllTitles
|
||
parameters:
|
||
- name: perPage
|
||
in: query
|
||
description: How many titles to show per page
|
||
schema:
|
||
type: integer
|
||
default: 20
|
||
- name: page
|
||
in: query
|
||
description: Which page to return
|
||
schema:
|
||
type: integer
|
||
default: 1
|
||
- name: order
|
||
in: query
|
||
description: What to sorty results by
|
||
schema:
|
||
type: string
|
||
default: popularity:desc
|
||
enum:
|
||
- popularity:desc
|
||
- budget:desc
|
||
- certification:desc
|
||
- release_date:desc
|
||
- revenue:desc
|
||
- runtime:desc
|
||
- score:desc
|
||
- name: type
|
||
in: query
|
||
description: Title type to filter results by
|
||
schema:
|
||
type: string
|
||
enum:
|
||
- movie
|
||
- series
|
||
default: null
|
||
- name: genre
|
||
in: query
|
||
description: Comma separated list of genre names to filter results by
|
||
schema:
|
||
type: string
|
||
example: action, comedy
|
||
default: null
|
||
- name: released
|
||
in: query
|
||
description: Release date range to filter results by. Date should be either year only or full date in YYYY-MM-DD format
|
||
schema:
|
||
type: string
|
||
example: 2019,2021
|
||
default: null
|
||
- name: runtime
|
||
in: query
|
||
description: Runtime range to filter results by.
|
||
schema:
|
||
type: string
|
||
example: 120,240
|
||
default: null
|
||
- name: score
|
||
in: query
|
||
description: Score range to filter results by.
|
||
schema:
|
||
type: string
|
||
example: 7,10
|
||
default: null
|
||
- name: language
|
||
in: query
|
||
description: ISO 639-1 language code to filter results by.
|
||
schema:
|
||
type: string
|
||
example: en
|
||
default: null
|
||
- name: certification
|
||
in: query
|
||
description: Certification code to filter results by.
|
||
schema:
|
||
type: string
|
||
example: pg-13
|
||
default: null
|
||
- name: country
|
||
in: query
|
||
description: Production country code to filter results by.
|
||
schema:
|
||
type: string
|
||
example: us
|
||
default: null
|
||
- name: onlyStreamable
|
||
in: query
|
||
description: Only show titles that are available to stream on the site
|
||
schema:
|
||
type: boolean
|
||
default: false
|
||
- name: includeAdult
|
||
in: query
|
||
description: Whether adult titles should be shown
|
||
schema:
|
||
type: boolean
|
||
default: false
|
||
responses:
|
||
'200':
|
||
description: Response body contains a paginated list of titles in JSON format.
|
||
content:
|
||
application/json:
|
||
schema:
|
||
type: object
|
||
properties:
|
||
status:
|
||
type: string
|
||
example: success
|
||
pagination:
|
||
allOf:
|
||
- $ref: '#/components/schemas/Pagination'
|
||
- type: object
|
||
properties:
|
||
data:
|
||
type: array
|
||
items:
|
||
$ref: '#/components/schemas/PartialTitle'
|
||
'401':
|
||
$ref: '#/components/schemas/401-Response'
|
||
'403':
|
||
$ref: '#/components/schemas/403-Response'
|
||
/titles/{id}:
|
||
parameters:
|
||
- name: id
|
||
in: path
|
||
description: ID of the title
|
||
example: 1
|
||
- name: seasonNumber
|
||
in: query
|
||
description: Number of season that should be returned along with a series
|
||
required: false
|
||
- name: episodeNumber
|
||
in: query
|
||
description: Number of episode that should be returned along with a series
|
||
required: false
|
||
- name: fullCredits
|
||
in: query
|
||
description: Whether to return all credits (15 are returned normally)
|
||
required: false
|
||
get:
|
||
tags:
|
||
- Titles
|
||
summary: Get full details about a movie or series
|
||
operationId: getTitle
|
||
responses:
|
||
'200':
|
||
description: Response body contains title data in JSON format.
|
||
content:
|
||
application/json:
|
||
schema:
|
||
type: object
|
||
properties:
|
||
status:
|
||
type: string
|
||
example: success
|
||
title:
|
||
$ref: '#/components/schemas/FullTitle'
|
||
|
||
'401':
|
||
$ref: '#/components/schemas/401-Response'
|
||
'403':
|
||
$ref: '#/components/schemas/403-Response'
|
||
/titles/{id}/related:
|
||
parameters:
|
||
- name: id
|
||
in: path
|
||
description: ID of the title
|
||
example: 1
|
||
get:
|
||
tags:
|
||
- Titles
|
||
summary: Get related titles for specified movie or series
|
||
operationId: getRelatedTitles
|
||
responses:
|
||
'200':
|
||
description: Response body contains a list of related titles in JSON format.
|
||
content:
|
||
application/json:
|
||
schema:
|
||
type: object
|
||
properties:
|
||
status:
|
||
type: string
|
||
example: success
|
||
titles:
|
||
type: array
|
||
items:
|
||
$ref: '#/components/schemas/PartialTitle'
|
||
|
||
'401':
|
||
$ref: '#/components/schemas/401-Response'
|
||
'403':
|
||
$ref: '#/components/schemas/403-Response'
|
||
|
||
/episodes/{id}:
|
||
parameters:
|
||
- name: id
|
||
in: path
|
||
description: ID of the episode
|
||
example: 1
|
||
get:
|
||
tags:
|
||
- Episodes
|
||
summary: Get full details about an episode
|
||
operationId: getEpisode
|
||
responses:
|
||
'200':
|
||
description: Response body contains episode data in JSON format.
|
||
content:
|
||
application/json:
|
||
schema:
|
||
type: object
|
||
properties:
|
||
status:
|
||
type: string
|
||
example: success
|
||
episode:
|
||
$ref: '#/components/schemas/Episode'
|
||
|
||
'401':
|
||
$ref: '#/components/schemas/401-Response'
|
||
'403':
|
||
$ref: '#/components/schemas/403-Response'
|
||
|
||
/people:
|
||
get:
|
||
tags:
|
||
- People
|
||
summary: Browse people
|
||
operationId: getAllPeople
|
||
parameters:
|
||
- name: perPage
|
||
in: query
|
||
description: How many people to show per page
|
||
schema:
|
||
type: integer
|
||
default: 20
|
||
- name: page
|
||
in: query
|
||
description: Which page to return
|
||
schema:
|
||
type: integer
|
||
default: 1
|
||
- name: mostPopular
|
||
in: query
|
||
description: Only show people that are above certain popularity
|
||
schema:
|
||
type: boolean
|
||
default: false
|
||
- name: includeAdult
|
||
in: query
|
||
description: Whether adult starts should be included
|
||
schema:
|
||
type: boolean
|
||
default: false
|
||
responses:
|
||
'200':
|
||
description: Response body contains a paginated list of people in JSON format.
|
||
content:
|
||
application/json:
|
||
schema:
|
||
type: object
|
||
properties:
|
||
status:
|
||
type: string
|
||
example: success
|
||
pagination:
|
||
allOf:
|
||
- $ref: '#/components/schemas/Pagination'
|
||
- type: object
|
||
properties:
|
||
data:
|
||
type: array
|
||
items:
|
||
type: object
|
||
allOf:
|
||
- $ref: '#/components/schemas/PartialPerson'
|
||
- type: object
|
||
properties:
|
||
popular_credits:
|
||
type: array
|
||
items:
|
||
$ref: '#/components/schemas/PartialTitle'
|
||
'401':
|
||
$ref: '#/components/schemas/401-Response'
|
||
'403':
|
||
$ref: '#/components/schemas/403-Response'
|
||
/people/{id}:
|
||
parameters:
|
||
- name: id
|
||
in: path
|
||
description: ID of the person
|
||
example: 1
|
||
get:
|
||
tags:
|
||
- People
|
||
summary: Get full details about a person
|
||
operationId: getPerson
|
||
responses:
|
||
'200':
|
||
description: Response body contains person data in JSON format.
|
||
content:
|
||
application/json:
|
||
schema:
|
||
type: object
|
||
properties:
|
||
status:
|
||
type: string
|
||
example: success
|
||
person:
|
||
$ref: '#/components/schemas/FullPerson'
|
||
'401':
|
||
$ref: '#/components/schemas/401-Response'
|
||
'403':
|
||
$ref: '#/components/schemas/403-Response'
|
||
|
||
/news:
|
||
get:
|
||
tags:
|
||
- News
|
||
summary: Browse news articles
|
||
operationId: getAllNews
|
||
parameters:
|
||
- name: perPage
|
||
in: query
|
||
description: How many articles to show per page
|
||
schema:
|
||
type: integer
|
||
default: 20
|
||
- name: page
|
||
in: query
|
||
description: Which page to return
|
||
schema:
|
||
type: integer
|
||
default: 1
|
||
responses:
|
||
'200':
|
||
description: Response body contains a paginated list of articles in JSON format.
|
||
content:
|
||
application/json:
|
||
schema:
|
||
type: object
|
||
properties:
|
||
status:
|
||
type: string
|
||
example: success
|
||
pagination:
|
||
allOf:
|
||
- $ref: '#/components/schemas/Pagination'
|
||
- type: object
|
||
properties:
|
||
data:
|
||
$ref: '#/components/schemas/NewsArticle'
|
||
'401':
|
||
$ref: '#/components/schemas/401-Response'
|
||
'403':
|
||
$ref: '#/components/schemas/403-Response'
|
||
/news/{id}:
|
||
parameters:
|
||
- name: id
|
||
in: path
|
||
description: ID of the article
|
||
example: 1
|
||
get:
|
||
tags:
|
||
- News
|
||
summary: Get full details about a news article
|
||
operationId: getNewsArticle
|
||
responses:
|
||
'200':
|
||
description: Response body contains article data in JSON format.
|
||
content:
|
||
application/json:
|
||
schema:
|
||
type: object
|
||
properties:
|
||
status:
|
||
type: string
|
||
example: success
|
||
article:
|
||
$ref: '#/components/schemas/NewsArticle'
|
||
'401':
|
||
$ref: '#/components/schemas/401-Response'
|
||
'403':
|
||
$ref: '#/components/schemas/403-Response'
|
||
'404':
|
||
$ref: '#/components/schemas/404-Response'
|
||
|
||
/search/{query}:
|
||
parameters:
|
||
- name: query
|
||
in: path
|
||
description: Search query
|
||
schema:
|
||
type: string
|
||
get:
|
||
tags:
|
||
- Search
|
||
summary: Search for movies, series and people
|
||
operationId: searchEverything
|
||
parameters:
|
||
- name: limit
|
||
in: query
|
||
description: How many search results to return
|
||
schema:
|
||
type: integer
|
||
default: 20
|
||
responses:
|
||
'200':
|
||
description: Response body contains a list of results matching search query in JSON format.
|
||
content:
|
||
application/json:
|
||
schema:
|
||
type: object
|
||
properties:
|
||
status:
|
||
type: string
|
||
example: success
|
||
query:
|
||
type: string
|
||
example: batman
|
||
results:
|
||
oneOf:
|
||
- $ref: '#/components/schemas/PartialTitle'
|
||
- $ref: '#/components/schemas/PartialPerson'
|
||
'401':
|
||
$ref: '#/components/schemas/401-Response'
|
||
'403':
|
||
$ref: '#/components/schemas/403-Response'
|
||
|
||
/lists:
|
||
post:
|
||
tags:
|
||
- Lists
|
||
summary: Create a new list
|
||
operationId: createList
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
allOf:
|
||
- $ref: '#/components/schemas/CrupdateListPayload'
|
||
- type: object
|
||
nullable: true
|
||
properties:
|
||
items:
|
||
type: array
|
||
items:
|
||
type: object
|
||
properties:
|
||
id:
|
||
type: integer
|
||
example: 1
|
||
type:
|
||
type: string
|
||
example: title
|
||
enum:
|
||
- title
|
||
- person
|
||
- episode
|
||
responses:
|
||
'200':
|
||
description: On success, the response body contains the created list object in JSON format
|
||
content:
|
||
application/json:
|
||
schema:
|
||
type: object
|
||
properties:
|
||
status:
|
||
type: string
|
||
example: success
|
||
list:
|
||
$ref: '#/components/schemas/PartialList'
|
||
'401':
|
||
$ref: '#/components/schemas/401-Response'
|
||
'403':
|
||
$ref: '#/components/schemas/403-Response'
|
||
'422':
|
||
$ref: '#/components/schemas/422-Response'
|
||
/lists/{id}:
|
||
parameters:
|
||
- name: id
|
||
in: path
|
||
description: ID of the list
|
||
example: 1
|
||
get:
|
||
tags:
|
||
- Lists
|
||
summary: Get the details of a list
|
||
operationId: getList
|
||
responses:
|
||
'200':
|
||
description: Response body contains list data in JSON format.
|
||
content:
|
||
application/json:
|
||
schema:
|
||
type: object
|
||
properties:
|
||
status:
|
||
type: string
|
||
example: success
|
||
list:
|
||
$ref: '#/components/schemas/FullList'
|
||
'401':
|
||
$ref: '#/components/schemas/401-Response'
|
||
'403':
|
||
$ref: '#/components/schemas/403-Response'
|
||
put:
|
||
tags:
|
||
- Lists
|
||
summary: Update specified list details
|
||
operationId: updateList
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/CrupdateListPayload'
|
||
responses:
|
||
'200':
|
||
description: On success, the response body contains the updated list object in JSON format
|
||
content:
|
||
application/json:
|
||
schema:
|
||
type: object
|
||
properties:
|
||
status:
|
||
type: string
|
||
example: success
|
||
list:
|
||
$ref: '#/components/schemas/PartialList'
|
||
'401':
|
||
$ref: '#/components/schemas/401-Response'
|
||
'403':
|
||
$ref: '#/components/schemas/403-Response'
|
||
'422':
|
||
$ref: '#/components/schemas/422-Response'
|
||
delete:
|
||
tags:
|
||
- Lists
|
||
summary: Delete a list
|
||
operationId: deleteList
|
||
responses:
|
||
'200':
|
||
description: List has been deleted successfully
|
||
content:
|
||
application/json:
|
||
schema:
|
||
type: object
|
||
properties:
|
||
status:
|
||
type: string
|
||
example: success
|
||
'401':
|
||
$ref: '#/components/schemas/401-Response'
|
||
'403':
|
||
$ref: '#/components/schemas/403-Response'
|
||
'404':
|
||
$ref: '#/components/schemas/404-Response'
|
||
/lists/{id}/add:
|
||
parameters:
|
||
- name: id
|
||
in: path
|
||
description: ID of the list
|
||
example: 1
|
||
post:
|
||
tags:
|
||
- Lists
|
||
summary: Add an item to a list
|
||
operationId: addToList
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
type: object
|
||
properties:
|
||
itemId:
|
||
type: integer
|
||
example: 1
|
||
description: ID of the item to add to list
|
||
itemType:
|
||
type: string
|
||
example: title
|
||
enum:
|
||
- title
|
||
- person
|
||
- episode
|
||
description: Type of the item
|
||
responses:
|
||
'200':
|
||
description: Response body contains list data in JSON format.
|
||
content:
|
||
application/json:
|
||
schema:
|
||
type: object
|
||
properties:
|
||
status:
|
||
type: string
|
||
example: success
|
||
list:
|
||
$ref: '#/components/schemas/PartialList'
|
||
'401':
|
||
$ref: '#/components/schemas/401-Response'
|
||
'403':
|
||
$ref: '#/components/schemas/403-Response'
|
||
'404':
|
||
$ref: '#/components/schemas/404-Response'
|
||
/lists/{id}/remove:
|
||
parameters:
|
||
- name: id
|
||
in: path
|
||
description: ID of the list
|
||
example: 1
|
||
post:
|
||
tags:
|
||
- Lists
|
||
summary: Remove an item from a list
|
||
operationId: removeFromList
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
type: object
|
||
properties:
|
||
itemId:
|
||
type: integer
|
||
example: 1
|
||
description: ID of the item to remove from list
|
||
itemType:
|
||
type: string
|
||
example: title
|
||
enum:
|
||
- title
|
||
- person
|
||
- episode
|
||
description: Type of the item
|
||
responses:
|
||
'200':
|
||
description: Response body contains list data in JSON format.
|
||
content:
|
||
application/json:
|
||
schema:
|
||
type: object
|
||
properties:
|
||
status:
|
||
type: string
|
||
example: success
|
||
list:
|
||
$ref: '#/components/schemas/PartialList'
|
||
'401':
|
||
$ref: '#/components/schemas/401-Response'
|
||
'403':
|
||
$ref: '#/components/schemas/403-Response'
|
||
'404':
|
||
$ref: '#/components/schemas/404-Response'
|
||
|
||
/user-profile/{id}:
|
||
parameters:
|
||
- name: id
|
||
in: path
|
||
description: ID of the user or "me" for currently logged in user.
|
||
example: me
|
||
get:
|
||
tags:
|
||
- Users
|
||
summary: Get public profile information about a user.
|
||
operationId: getUser
|
||
responses:
|
||
'200':
|
||
description: Response body contains a user object in JSON format.
|
||
content:
|
||
application/json:
|
||
schema:
|
||
type: object
|
||
properties:
|
||
status:
|
||
type: string
|
||
example: success
|
||
user:
|
||
$ref: '#/components/schemas/User'
|
||
'401':
|
||
$ref: '#/components/schemas/401-Response'
|
||
'403':
|
||
$ref: '#/components/schemas/403-Response'
|
||
'404':
|
||
$ref: '#/components/schemas/404-Response'
|
||
/user-profile/{id}/lists:
|
||
parameters:
|
||
- name: id
|
||
in: path
|
||
description: ID of the user or "me" for currently logged in user.
|
||
example: me
|
||
get:
|
||
tags:
|
||
- Users
|
||
summary: Lists created by the user
|
||
operationId: getUserLists
|
||
parameters:
|
||
- name: perPage
|
||
in: query
|
||
description: How many lists to return per page
|
||
schema:
|
||
type: integer
|
||
default: 20
|
||
- name: page
|
||
in: query
|
||
description: Which page to return
|
||
schema:
|
||
type: integer
|
||
default: 1
|
||
responses:
|
||
'200':
|
||
description: Response body contains a paginated list of lists user has created in JSON format.
|
||
content:
|
||
application/json:
|
||
schema:
|
||
type: object
|
||
properties:
|
||
status:
|
||
type: string
|
||
example: success
|
||
pagination:
|
||
allOf:
|
||
- $ref: '#/components/schemas/Pagination'
|
||
- type: object
|
||
properties:
|
||
data:
|
||
type: array
|
||
items:
|
||
$ref: '#/components/schemas/PartialList'
|
||
'401':
|
||
$ref: '#/components/schemas/401-Response'
|
||
'403':
|
||
$ref: '#/components/schemas/403-Response'
|
||
'404':
|
||
$ref: '#/components/schemas/404-Response'
|
||
/user-profile/{id}/reviews:
|
||
parameters:
|
||
- name: id
|
||
in: path
|
||
description: ID of the user or "me" for currently logged in user.
|
||
example: me
|
||
get:
|
||
tags:
|
||
- Users
|
||
summary: Reviews created by the user
|
||
operationId: getUserReviews
|
||
parameters:
|
||
- name: perPage
|
||
in: query
|
||
description: How many reviews to return per page
|
||
schema:
|
||
type: integer
|
||
default: 20
|
||
- name: page
|
||
in: query
|
||
description: Which page to return
|
||
schema:
|
||
type: integer
|
||
default: 1
|
||
responses:
|
||
'200':
|
||
description: Response body contains a paginated list of reviews user has created in JSON format.
|
||
content:
|
||
application/json:
|
||
schema:
|
||
type: object
|
||
properties:
|
||
status:
|
||
type: string
|
||
example: success
|
||
pagination:
|
||
allOf:
|
||
- $ref: '#/components/schemas/Pagination'
|
||
- type: object
|
||
properties:
|
||
data:
|
||
type: array
|
||
items:
|
||
$ref: '#/components/schemas/Review'
|
||
'401':
|
||
$ref: '#/components/schemas/401-Response'
|
||
'403':
|
||
$ref: '#/components/schemas/403-Response'
|
||
'404':
|
||
$ref: '#/components/schemas/404-Response'
|
||
/user-profile/{id}/ratings:
|
||
parameters:
|
||
- name: id
|
||
in: path
|
||
description: ID of the user or "me" for currently logged in user.
|
||
example: me
|
||
get:
|
||
tags:
|
||
- Users
|
||
summary: Ratings left by the user
|
||
operationId: getUserRatings
|
||
parameters:
|
||
- name: perPage
|
||
in: query
|
||
description: How many ratings to return per page
|
||
schema:
|
||
type: integer
|
||
default: 20
|
||
- name: page
|
||
in: query
|
||
description: Which page to return
|
||
schema:
|
||
type: integer
|
||
default: 1
|
||
responses:
|
||
'200':
|
||
description: Response body contains a paginated list of ratings user has created in JSON format.
|
||
content:
|
||
application/json:
|
||
schema:
|
||
type: object
|
||
properties:
|
||
status:
|
||
type: string
|
||
example: success
|
||
pagination:
|
||
allOf:
|
||
- $ref: '#/components/schemas/Pagination'
|
||
- type: object
|
||
properties:
|
||
data:
|
||
type: array
|
||
items:
|
||
$ref: '#/components/schemas/Review'
|
||
'401':
|
||
$ref: '#/components/schemas/401-Response'
|
||
'403':
|
||
$ref: '#/components/schemas/403-Response'
|
||
'404':
|
||
$ref: '#/components/schemas/404-Response'
|
||
/user-profile/{id}/comments:
|
||
parameters:
|
||
- name: id
|
||
in: path
|
||
description: ID of the user or "me" for currently logged in user.
|
||
example: me
|
||
get:
|
||
tags:
|
||
- Users
|
||
summary: Comments left by the user
|
||
operationId: getUserComments
|
||
parameters:
|
||
- name: perPage
|
||
in: query
|
||
description: How many comments to return per page
|
||
schema:
|
||
type: integer
|
||
default: 20
|
||
- name: page
|
||
in: query
|
||
description: Which page to return
|
||
schema:
|
||
type: integer
|
||
default: 1
|
||
responses:
|
||
'200':
|
||
description: Response body contains a paginated list of comments user has created in JSON format.
|
||
content:
|
||
application/json:
|
||
schema:
|
||
type: object
|
||
properties:
|
||
status:
|
||
type: string
|
||
example: success
|
||
pagination:
|
||
allOf:
|
||
- $ref: '#/components/schemas/Pagination'
|
||
- type: object
|
||
properties:
|
||
data:
|
||
type: array
|
||
items:
|
||
$ref: '#/components/schemas/Comment'
|
||
'401':
|
||
$ref: '#/components/schemas/401-Response'
|
||
'403':
|
||
$ref: '#/components/schemas/403-Response'
|
||
'404':
|
||
$ref: '#/components/schemas/404-Response'
|
||
|
||
/reviews:
|
||
post:
|
||
tags:
|
||
- Reviews
|
||
summary: Create a new review or rating
|
||
operationId: createReview
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/CreateReviewPayload'
|
||
responses:
|
||
'200':
|
||
description: On success, the response body contains the created review object in JSON format
|
||
content:
|
||
application/json:
|
||
schema:
|
||
type: object
|
||
properties:
|
||
status:
|
||
type: string
|
||
example: success
|
||
review:
|
||
$ref: '#/components/schemas/Review'
|
||
'401':
|
||
$ref: '#/components/schemas/401-Response'
|
||
'403':
|
||
$ref: '#/components/schemas/403-Response'
|
||
'422':
|
||
$ref: '#/components/schemas/422-Response'
|
||
/reviews/{id}:
|
||
parameters:
|
||
- name: id
|
||
in: path
|
||
description: ID of the review
|
||
example: 1
|
||
put:
|
||
tags:
|
||
- Reviews
|
||
summary: Update specified review details
|
||
operationId: updateReview
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
type: object
|
||
properties:
|
||
review:
|
||
type: string
|
||
description: Review body
|
||
score:
|
||
type: integer
|
||
example: 7
|
||
description: Review score
|
||
responses:
|
||
'200':
|
||
description: On success, the response body contains the updated revew object in JSON format
|
||
content:
|
||
application/json:
|
||
schema:
|
||
type: object
|
||
properties:
|
||
status:
|
||
type: string
|
||
example: success
|
||
review:
|
||
$ref: '#/components/schemas/Review'
|
||
'401':
|
||
$ref: '#/components/schemas/401-Response'
|
||
'403':
|
||
$ref: '#/components/schemas/403-Response'
|
||
'422':
|
||
$ref: '#/components/schemas/422-Response'
|
||
delete:
|
||
tags:
|
||
- Reviews
|
||
summary: Delete a review or rating
|
||
operationId: deleteReview
|
||
responses:
|
||
'200':
|
||
description: Review has been deleted successfully
|
||
content:
|
||
application/json:
|
||
schema:
|
||
type: object
|
||
properties:
|
||
status:
|
||
type: string
|
||
example: success
|
||
'401':
|
||
$ref: '#/components/schemas/401-Response'
|
||
'403':
|
||
$ref: '#/components/schemas/403-Response'
|
||
'404':
|
||
$ref: '#/components/schemas/404-Response'
|
||
|
||
/auth/register:
|
||
post:
|
||
security: []
|
||
tags:
|
||
- Auth
|
||
summary: Register for a new account
|
||
operationId: register
|
||
responses:
|
||
'200':
|
||
description: User registered
|
||
content:
|
||
application/json:
|
||
schema:
|
||
type: object
|
||
properties:
|
||
status:
|
||
type: string
|
||
example: success
|
||
user:
|
||
$ref: '#/components/schemas/User'
|
||
'401':
|
||
$ref: '#/components/schemas/401-Response'
|
||
'403':
|
||
$ref: '#/components/schemas/403-Response'
|
||
'422':
|
||
description: Invalid data specified
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/422-Response'
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
type: object
|
||
properties:
|
||
email:
|
||
type: string
|
||
example: 'example@gmail.com'
|
||
password:
|
||
type: string
|
||
example: password
|
||
token_name:
|
||
type: string
|
||
example: 'iphone 12'
|
||
/auth/login:
|
||
post:
|
||
security: []
|
||
tags:
|
||
- Auth
|
||
summary: Get access token
|
||
description: 'Logs in specified user and returns user object along with access token. <br><br> Access Token is a string that enables SITE_NAME to verify that a request belongs to an authorized session. This token should be sent along with every request to SITE_NAME API in a authorization header: `Authorization: Bearer <Token>`.'
|
||
operationId: login
|
||
responses:
|
||
'200':
|
||
description: Operation successful
|
||
content:
|
||
application/json:
|
||
schema:
|
||
type: object
|
||
properties:
|
||
status:
|
||
type: string
|
||
example: success
|
||
user:
|
||
$ref: '#/components/schemas/User'
|
||
'401':
|
||
$ref: '#/components/schemas/401-Response'
|
||
'403':
|
||
$ref: '#/components/schemas/403-Response'
|
||
'422':
|
||
description: Invalid data specified
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/422-Response'
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
type: object
|
||
properties:
|
||
email:
|
||
type: string
|
||
example: 'example@gmail.com'
|
||
password:
|
||
type: string
|
||
example: 'password'
|
||
device_name:
|
||
type: string
|
||
example: 'iphone 12'
|
||
|
||
components:
|
||
schemas:
|
||
Pagination:
|
||
type: object
|
||
properties:
|
||
current_page:
|
||
type: integer
|
||
format: int64
|
||
example: 1
|
||
from:
|
||
type: integer
|
||
format: int64
|
||
example: 1
|
||
to:
|
||
type: integer
|
||
format: int64
|
||
example: 100
|
||
per_page:
|
||
type: integer
|
||
format: int64
|
||
example: 25
|
||
last_page:
|
||
type: integer
|
||
format: int64
|
||
example: 156
|
||
total:
|
||
type: integer
|
||
format: int64
|
||
example: 264
|
||
|
||
PartialTitle:
|
||
properties:
|
||
id:
|
||
type: integer
|
||
format: int64
|
||
example: 1
|
||
name:
|
||
type: string
|
||
example: The Suicide Squad
|
||
description: Title's name
|
||
release_date:
|
||
type: string
|
||
example: '2021-07-28T00:00:00.000000Z'
|
||
description: Title's Release date in ISO format
|
||
year:
|
||
type: string
|
||
example: 2021
|
||
description: Year title first released or was aired (if series)
|
||
tagline:
|
||
type: string
|
||
example: They're dying to save the world.
|
||
description: Title's tagline
|
||
poster:
|
||
type: string
|
||
example: https://image.tmdb.org/t/p/original/iCi4c4FvVdbaU1t8poH1gvzT6xM.jpg
|
||
description: Title's poster URL
|
||
backdrop:
|
||
type: string
|
||
example: https://image.tmdb.org/t/p/w1280/jlGmlFOcfo8n5tURmhC7YVd4Iyy.jpg
|
||
description: Title's backdrop URL
|
||
runtime:
|
||
type: integer
|
||
example: 132
|
||
description: Title's runtime in minutes
|
||
budget:
|
||
type: integer
|
||
example: 180000000
|
||
description: Title's budget in US dollars
|
||
revenue:
|
||
type: integer
|
||
example: 121261711
|
||
description: Current title's revenue worldwide
|
||
popularity:
|
||
type: integer
|
||
example: 5659
|
||
description: Title's popularity
|
||
tmdb_id:
|
||
type: integer
|
||
example: 436969
|
||
description: Title's ID on themoviedatabase site
|
||
imdb_id:
|
||
type: string
|
||
example: tt6334354
|
||
description: Title's ID on IMDb site
|
||
is_series:
|
||
type: boolean
|
||
example: false
|
||
description: Whether title is a series
|
||
adult:
|
||
type: boolean
|
||
example: false
|
||
description: Whether it's an adult title
|
||
season_count:
|
||
type: integer
|
||
example: 0
|
||
description: Number of seasons title has (if it's a series)
|
||
episode_count:
|
||
type: integer
|
||
example: 0
|
||
description: Number of episodes title has (if it's a series)
|
||
series_ended:
|
||
type: boolean
|
||
example: false
|
||
description: Whether series has ended or was cancelled
|
||
language:
|
||
type: string
|
||
example: en
|
||
description: Title's primary spoken language (ISO 639-1)
|
||
original_title:
|
||
type: string
|
||
example: The Suicide Squad
|
||
description: Title's original language (if name is not in english)
|
||
certification:
|
||
type: string
|
||
example: r
|
||
description: Title's certification code
|
||
rating:
|
||
type: string
|
||
example: 8.1
|
||
description: Title's user rating
|
||
vote_count:
|
||
type: integer
|
||
example: 2657
|
||
description: How many users rated the title
|
||
FullTitle:
|
||
allOf:
|
||
- $ref: '#/components/schemas/PartialTitle'
|
||
- type: object
|
||
properties:
|
||
images:
|
||
type: array
|
||
items:
|
||
$ref: '#/components/schemas/Image'
|
||
description: List of backdrop and poster images for the title
|
||
genres:
|
||
type: array
|
||
items:
|
||
$ref: '#/components/schemas/Genre'
|
||
description: List of genres for the title
|
||
keywords:
|
||
type: array
|
||
items:
|
||
$ref: '#/components/schemas/Keyword'
|
||
description: List of keywords for the title
|
||
credits:
|
||
type: array
|
||
items:
|
||
$ref: '#/components/schemas/TitleCredit'
|
||
description: List of credits for the title
|
||
seasons:
|
||
type: array
|
||
items:
|
||
$ref: '#/components/schemas/Season'
|
||
description: List of title's seasons (if it's a series)
|
||
season:
|
||
type: array
|
||
items:
|
||
$ref: '#/components/schemas/Season'
|
||
description: Currently selected season (Specified via "seasonNumber" query parameter)
|
||
description:
|
||
type: string
|
||
description: Title's plot
|
||
example: Supervillains Harley Quinn, Bloodsport, Peacemaker and a collection of nutty cons at Belle Reve prison join the super-secret, super-shady Task Force X as they are dropped off at the remote, enemy-infused island of Corto Maltese.
|
||
|
||
Image:
|
||
type: object
|
||
properties:
|
||
url:
|
||
type: string
|
||
example: https://image.tmdb.org/t/p/original/jlGmlFOcfo8n5tURmhC7YVd4Iyy.jpg
|
||
description: Image's URL
|
||
type:
|
||
type: string
|
||
example: backdrop
|
||
description: Image's type
|
||
source:
|
||
type: string
|
||
example: tmdb
|
||
description: Image's source
|
||
|
||
Genre:
|
||
type: object
|
||
properties:
|
||
name:
|
||
type: string
|
||
example: action
|
||
description: Genre's slug
|
||
display_name:
|
||
type: string
|
||
example: Action
|
||
description: Genre name visible to user
|
||
|
||
Keyword:
|
||
type: object
|
||
properties:
|
||
name:
|
||
type: string
|
||
example: superhero
|
||
description: Keyword's slug
|
||
display_name:
|
||
type: string
|
||
example: Superhero
|
||
description: Keyword name visible to user
|
||
|
||
Video:
|
||
type: object
|
||
properties:
|
||
name:
|
||
type: string
|
||
example: The Suicide Squad - King Shark
|
||
description: Video's name
|
||
thumbnail:
|
||
type: string
|
||
example: https://site.com/thumbnail.jpg
|
||
description: Video's thumbnail URL
|
||
url:
|
||
type: string
|
||
example: https://youtube.com/embed/JD17Usa3588
|
||
description: Video's URL
|
||
type:
|
||
type: string
|
||
example: embed
|
||
description: Video's type
|
||
quality:
|
||
type: string
|
||
example: hd
|
||
description: Video's quality
|
||
source:
|
||
type: string
|
||
example: tmdb
|
||
description: Video's source
|
||
language:
|
||
type: string
|
||
example: en
|
||
description: Video's language
|
||
category:
|
||
type: string
|
||
example: teaser
|
||
description: Video's category
|
||
captions:
|
||
type: array
|
||
items:
|
||
$ref: '#/components/schemas/Caption'
|
||
description: List of captions for the video
|
||
|
||
Caption:
|
||
type: object
|
||
properties:
|
||
name:
|
||
type: string
|
||
example: English
|
||
description: Caption's name
|
||
language:
|
||
type: string
|
||
example: en
|
||
description: Caption's language code
|
||
url:
|
||
type: string
|
||
example: https://site.com/caption.vtt
|
||
description: Caption's file URL
|
||
|
||
Season:
|
||
type: object
|
||
properties:
|
||
number:
|
||
type: integer
|
||
example: 1
|
||
description: Season's number
|
||
release_date:
|
||
type: string
|
||
example: '2021-06-09T00:00:00.000000Z'
|
||
description: Season's air date
|
||
episode_count:
|
||
type: integer
|
||
example: 8
|
||
description: Number of episodes in this season
|
||
poster:
|
||
type: string
|
||
example: https://image.tmdb.org/t/p/original/8uVqe9ThcuYVNdh4O0kuijIWMLL.jpg
|
||
description: Season's primary poster URL
|
||
episodes:
|
||
type: array
|
||
description: Only available when showing full season details.
|
||
items:
|
||
$ref: '#/components/schemas/Episode'
|
||
|
||
Episode:
|
||
type: object
|
||
properties:
|
||
name:
|
||
type: string
|
||
example: Glorious Purpose
|
||
description: Episodes's name
|
||
descrption:
|
||
type: string
|
||
example: Glorious Purpose
|
||
description: 'After stealing the Tesseract in \"Avengers: Endgame,\" Loki lands before the Time Variance Authority.'
|
||
poster:
|
||
type: string
|
||
example: https://image.tmdb.org/t/p/original/gxh0k3aADsYkt9tgkfm2kGn2qQj.jpg
|
||
description: Episode's primary poster URL
|
||
release_date:
|
||
type: string
|
||
example: '2021-06-09T00:00:00.000000Z'
|
||
description: Episode's air date
|
||
season_number:
|
||
type: integer
|
||
example: 1
|
||
description: Season number
|
||
episode_number:
|
||
type: integer
|
||
example: 1
|
||
description: Episode number
|
||
year:
|
||
type: integer
|
||
example: 2021
|
||
description: Episode's air year
|
||
popularity:
|
||
type: integer
|
||
example: 5659
|
||
description: Episode's popularity
|
||
rating:
|
||
type: string
|
||
example: 6.6
|
||
description: Episode's user rating
|
||
vote_count:
|
||
type: integer
|
||
example: 50
|
||
description: How many users rated the episode
|
||
credits:
|
||
type: array
|
||
description: List of credits for the episode. Only available when showing full episode details
|
||
items:
|
||
$ref: '#/components/schemas/TitleCredit'
|
||
|
||
TitleCredit:
|
||
type: object
|
||
properties:
|
||
name:
|
||
type: string
|
||
example: James Gunn
|
||
description: Person name
|
||
poster:
|
||
type: string
|
||
example: https://image.tmdb.org/t/p/original/nHr6yzPF15jQz5eBke1SDNWectu.jpg
|
||
description: Person image
|
||
pivot:
|
||
type: object
|
||
properties:
|
||
job:
|
||
type: string
|
||
example: directing
|
||
department:
|
||
type: string
|
||
example: directing
|
||
character:
|
||
type: string
|
||
example: King Shar
|
||
PartialPerson:
|
||
type: object
|
||
properties:
|
||
name:
|
||
type: string
|
||
example: Margot Robbie
|
||
description: Person's name
|
||
description:
|
||
type: string
|
||
example: Margot Elise Robbie (born 2 July 1990) is an Australian actress and producer. She has received nominations for two Academy Awards and five BAFTA Awards. In 2017, Time magazine named her one of the 100 most influential people in the world, and in 2019, she was ranked among the world's highest-paid actresses.\n\nRobbie studied drama at Somerset College and began her career in Australian independent films in the late 2000s, before working in the soap opera Neighbours (2008–2011). After moving to Amer...
|
||
description: Person's biogragphy
|
||
poster:
|
||
type: string
|
||
example: https://image.tmdb.org/t/p/original/euDPyqLnuwaWMHajcU3oZ9uZezR.jpg
|
||
description: Person's image
|
||
gender:
|
||
type: string
|
||
example: female
|
||
description: Person's gender
|
||
birth_date:
|
||
type: string
|
||
example: '1990-07-02'
|
||
description: Person's birth date
|
||
death_date:
|
||
type: string
|
||
example: null
|
||
description: Person's death date
|
||
birth_place:
|
||
type: string
|
||
example: Dalby, Queensland, Australia
|
||
description: Person's birth place
|
||
imdb_id:
|
||
type: string
|
||
example: nm3053338
|
||
description: Person's ID on IMDb site
|
||
tmdb_id:
|
||
type: integer
|
||
example: 234352
|
||
description: Person's ID on themoviedatabase site
|
||
known_for:
|
||
type: string
|
||
example: acting
|
||
description: Acting, directing, writing etc.
|
||
adult:
|
||
type: boolean
|
||
example: false
|
||
description: Whether it's an adult star
|
||
FullPerson:
|
||
allOf:
|
||
- $ref: '#/components/schemas/PartialPerson'
|
||
- type: object
|
||
properties:
|
||
credits:
|
||
type: object
|
||
properties:
|
||
cast:
|
||
type: array
|
||
items:
|
||
$ref: '#/components/schemas/PartialTitle'
|
||
production:
|
||
type: array
|
||
items:
|
||
$ref: '#/components/schemas/PartialTitle'
|
||
knownFor:
|
||
type: array
|
||
items:
|
||
$ref: '#/components/schemas/PartialTitle'
|
||
|
||
PartialList:
|
||
type: object
|
||
properties:
|
||
name:
|
||
type: string
|
||
example: My List
|
||
description: List's name
|
||
description:
|
||
type: string
|
||
example: This is my list...
|
||
description: List's description
|
||
public:
|
||
type: boolean
|
||
default: false
|
||
description: Whether list is set as public
|
||
created_at:
|
||
type: string
|
||
example: '2021-07-12T01:28:52.000000Z'
|
||
description: Date list was created
|
||
updated_at:
|
||
type: string
|
||
example: '2021-07-12T01:28:52.000000Z'
|
||
description: Date list was last updated
|
||
image:
|
||
type: string
|
||
example: https://image.tmdb.org/t/p/original/2mtQwJKVKQrZgTz49Dizb25eOQQ.jpg
|
||
description: Primary image for the list
|
||
FullList:
|
||
allOf:
|
||
- $ref: '#/components/schemas/PartialList'
|
||
- type: object
|
||
properties:
|
||
items:
|
||
allOf:
|
||
- $ref: '#/components/schemas/Pagination'
|
||
- type: object
|
||
properties:
|
||
data:
|
||
type: array
|
||
items:
|
||
oneOf:
|
||
- $ref: '#/components/schemas/PartialTitle'
|
||
- $ref: '#/components/schemas/PartialPerson'
|
||
- $ref: '#/components/schemas/Episode'
|
||
CrupdateListPayload:
|
||
type: object
|
||
properties:
|
||
details:
|
||
type: object
|
||
properties:
|
||
name:
|
||
type: string
|
||
example: My list
|
||
description:
|
||
type: string
|
||
nullable: true
|
||
description: Short description
|
||
public:
|
||
type: string
|
||
nullable: true
|
||
default: false
|
||
description: Whether this list will be set as public
|
||
|
||
Review:
|
||
type: object
|
||
properties:
|
||
body:
|
||
type: string
|
||
description: Review body created by the user
|
||
score:
|
||
type: integer
|
||
example: 7
|
||
description: Review rating
|
||
created_at:
|
||
type: string
|
||
example: '2021-07-12T01:28:52.000000Z'
|
||
description: Date review was created
|
||
updated_at:
|
||
type: string
|
||
example: '2021-07-12T01:28:52.000000Z'
|
||
description: Date review was last updated
|
||
image:
|
||
type: string
|
||
example: https://image.tmdb.org/t/p/original/2mtQwJKVKQrZgTz49Dizb25eOQQ.jpg
|
||
description: Primary image for the list
|
||
reviewable:
|
||
oneOf:
|
||
- $ref: '#/components/schemas/PartialTitle'
|
||
- $ref: '#/components/schemas/Episode'
|
||
CreateReviewPayload:
|
||
type: object
|
||
properties:
|
||
mediaId:
|
||
type: integer
|
||
example: 1
|
||
description: ID of the title or episode
|
||
mediaType:
|
||
type: integer
|
||
example: title
|
||
enum:
|
||
- title
|
||
- episode
|
||
review:
|
||
type: string
|
||
description: Review body
|
||
score:
|
||
type: integer
|
||
example: 7
|
||
description: Review score
|
||
|
||
NewsArticle:
|
||
type: object
|
||
properties:
|
||
id:
|
||
type: integer
|
||
title:
|
||
type: string
|
||
description: Article title
|
||
body:
|
||
type: string
|
||
description: Article body
|
||
slug:
|
||
type: string
|
||
description: Article slug
|
||
created_at:
|
||
type: string
|
||
example: '2021-07-12T01:28:52.000000Z'
|
||
description: Date article was created
|
||
updated_at:
|
||
type: string
|
||
example: '2021-07-12T01:28:52.000000Z'
|
||
description: Date article was last updated
|
||
|
||
Comment:
|
||
type: object
|
||
properties:
|
||
id:
|
||
type: integer
|
||
content:
|
||
type: string
|
||
description: Comment content
|
||
parent_id:
|
||
type: integer
|
||
description: Id of the comment this comment was in reply to
|
||
deleted:
|
||
type: boolean
|
||
description: If deleted is true, comment content will not be available
|
||
depth:
|
||
type: integer
|
||
description: How deep is this comment withtin a thread
|
||
commentable:
|
||
oneOf:
|
||
- $ref: '#/components/schemas/PartialTitle'
|
||
- $ref: '#/components/schemas/Episode'
|
||
user:
|
||
$ref: '#/components/schemas/User'
|
||
|
||
User:
|
||
type: object
|
||
properties:
|
||
id:
|
||
type: integer
|
||
format: int64
|
||
display_name:
|
||
type: string
|
||
avatar:
|
||
type: string
|
||
first_name:
|
||
type: string
|
||
last_name:
|
||
type: string
|
||
gender:
|
||
type: string
|
||
|
||
Tag:
|
||
type: object
|
||
properties:
|
||
id:
|
||
type: integer
|
||
format: int64
|
||
example: 1
|
||
name:
|
||
type: string
|
||
example: favorites
|
||
|
||
401-Response:
|
||
description: Unauthenticated. Either access token is not provided or is invalid.
|
||
403-Response:
|
||
description: Unauthorized access. You don't have permissions required to perform this operation.
|
||
404-Response:
|
||
description: Resource not found. Could not find a resource with specified name or ID.
|
||
422-Response:
|
||
type: object
|
||
properties:
|
||
status:
|
||
type: string
|
||
example: error
|
||
message:
|
||
type: string
|
||
example: 'Reason for the error'
|
||
errors:
|
||
type: object
|
||
properties:
|
||
some_data_1:
|
||
type: string
|
||
example: Error message for data 1
|
||
some_data_2:
|
||
type: string
|
||
example: Error message for data 2
|
||
|
||
securitySchemes:
|
||
accessToken:
|
||
type: http
|
||
scheme: bearer
|