Legendary Entertainment comments API
The comments API from Legendary Entertainment — 2 operation(s) for comments.
The comments API from Legendary Entertainment — 2 operation(s) for comments.
openapi: 3.1.0
info:
title: Legendary Entertainment WordPress REST block-directory comments API
version: wp/v2
description: 'Read-oriented content API exposed by legendary.com: the WordPress REST API (namespace wp/v2) serving Legendary Entertainment news posts, pages, media, categories and tags. Derived by API Evangelist from the live route discovery document at https://www.legendary.com/wp-json/wp/v2 . This is the platform API exposed by the marketing site, NOT a documented first-party Legendary developer program. GET collections are publicly readable without authentication; write operations require WordPress Application Password credentials.'
contact:
name: Legendary Entertainment
url: https://www.legendary.com/about/
servers:
- url: https://www.legendary.com/wp-json/wp/v2
description: Production
tags:
- name: comments
paths:
/comments:
get:
operationId: getComments
summary: GET /comments
tags:
- comments
parameters:
- name: after
in: query
required: false
schema:
type: string
description: Limit response to comments published after a given ISO8601 compliant date.
- name: author
in: query
required: false
schema:
type: array
description: Limit result set to comments assigned to specific user IDs. Requires authorization.
- name: author_email
in: query
required: false
schema:
type: string
description: Limit result set to that from a specific author email. Requires authorization.
- name: author_exclude
in: query
required: false
schema:
type: array
description: Ensure result set excludes comments assigned to specific user IDs. Requires authorization.
- name: before
in: query
required: false
schema:
type: string
description: Limit response to comments published before a given ISO8601 compliant date.
- name: context
in: query
required: false
schema:
type: string
enum:
- view
- embed
- edit
default: view
description: Scope under which the request is made; determines fields present in response.
- name: exclude
in: query
required: false
schema:
type: array
default: []
description: Ensure result set excludes specific IDs.
- name: include
in: query
required: false
schema:
type: array
default: []
description: Limit result set to specific IDs.
- name: offset
in: query
required: false
schema:
type: integer
description: Offset the result set by a specific number of items.
- name: order
in: query
required: false
schema:
type: string
enum:
- asc
- desc
default: desc
description: Order sort attribute ascending or descending.
- name: orderby
in: query
required: false
schema:
type: string
enum:
- date
- date_gmt
- id
- include
- post
- parent
- type
default: date_gmt
description: Sort collection by comment attribute.
- name: page
in: query
required: false
schema:
type: integer
default: 1
description: Current page of the collection.
- name: parent
in: query
required: false
schema:
type: array
default: []
description: Limit result set to comments of specific parent IDs.
- name: parent_exclude
in: query
required: false
schema:
type: array
default: []
description: Ensure result set excludes specific parent IDs.
- name: password
in: query
required: false
schema:
type: string
description: The password for the post if it is password protected.
- name: per_page
in: query
required: false
schema:
type: integer
default: 10
description: Maximum number of items to be returned in result set.
- name: post
in: query
required: false
schema:
type: array
default: []
description: Limit result set to comments assigned to specific post IDs.
- name: search
in: query
required: false
schema:
type: string
description: Limit results to those matching a string.
- name: status
in: query
required: false
schema:
type: string
default: approve
description: Limit result set to comments assigned a specific status. Requires authorization.
- name: type
in: query
required: false
schema:
type: string
default: comment
description: Limit result set to comments assigned a specific type. Requires authorization.
responses:
'200':
description: Successful response
headers:
X-WP-Total:
description: Total number of records
schema:
type: integer
X-WP-TotalPages:
description: Total number of pages
schema:
type: integer
Link:
description: RFC 8288 pagination links (rel=next/prev)
schema:
type: string
content:
application/json:
schema:
type: object
'400':
$ref: '#/components/responses/Error'
'401':
$ref: '#/components/responses/Error'
'404':
$ref: '#/components/responses/Error'
post:
operationId: createComments
summary: POST /comments
tags:
- comments
security:
- applicationPassword: []
responses:
'201':
description: Successful response
content:
application/json:
schema:
type: object
'400':
$ref: '#/components/responses/Error'
'401':
$ref: '#/components/responses/Error'
'404':
$ref: '#/components/responses/Error'
/comments/{id}:
parameters:
- name: id
in: path
required: true
schema:
type: integer
get:
operationId: getCommentsById
summary: GET /comments/{id}
tags:
- comments
parameters:
- name: context
in: query
required: false
schema:
type: string
enum:
- view
- embed
- edit
default: view
description: Scope under which the request is made; determines fields present in response.
- name: password
in: query
required: false
schema:
type: string
description: The password for the parent post of the comment (if the post is password protected).
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
'400':
$ref: '#/components/responses/Error'
'401':
$ref: '#/components/responses/Error'
'404':
$ref: '#/components/responses/Error'
post:
operationId: createCommentsById
summary: POST /comments/{id}
tags:
- comments
security:
- applicationPassword: []
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
'400':
$ref: '#/components/responses/Error'
'401':
$ref: '#/components/responses/Error'
'404':
$ref: '#/components/responses/Error'
delete:
operationId: deleteCommentsById
summary: DELETE /comments/{id}
tags:
- comments
security:
- applicationPassword: []
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
'400':
$ref: '#/components/responses/Error'
'401':
$ref: '#/components/responses/Error'
'404':
$ref: '#/components/responses/Error'
components:
schemas:
Error:
type: object
description: WordPress REST API error envelope (not RFC 9457)
properties:
code:
type: string
message:
type: string
data:
type: object
properties:
status:
type: integer
responses:
Error:
description: WordPress REST error envelope
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
code: rest_post_invalid_id
message: Invalid post ID.
data:
status: 404
securitySchemes:
applicationPassword:
type: http
scheme: basic
description: WordPress Application Passwords, advertised by the site at https://www.legendary.com/wp-admin/authorize-application.php