api:artist commentaries
Table of Contents
- 01. Record field format
- 02. Associated attributes
- 03. Index
- 04. Show
- 05. Create or update
- 06. Revert
- 07. See also
- 08. External links
This page has details for how to interact with artist commentary records through the API.
Record field format
| Name | Type | Details |
|---|---|---|
id | integer | >0 |
post_id | integer | >0 |
original_title | string | |
original_description | string | |
translated_title | string | |
translated_description | string | |
created_at | timestamp | |
updated_at | timestamp |
Associated attributes
The following is the list of relations that can be included in the API results (see Help:Common URL parameters for more info):
| Name | Type | Number | Availability | Details |
|---|---|---|---|---|
post | post | single | required | Post that the artist commentary belongs to. |
Index
Returns multiple artist commentary records.
| HTTP Method | GET |
| Base URL | /artist_commentaries.json |
| Type | read request |
| Description | The default order is ID descending. |
Search attributes
Search parameters take the following format (see Help:Common URL parameters for more info):
search[FIELD]=VALUE
The following are the base fields along with their associated type. Check the syntax pages for all of the available variations.
- Number syntax
idcreated_atupdated_at- Text syntax
original_titleoriginal_descriptiontranslated_titletranslated_description- Post syntax
post
Special search parameters
The following are additional search fields.
text_matches- Case-insensitive wildcard searching on any of the text fields.original_present(boolean syntax) - Does it have an original title or an original description?translated_present(boolean syntax) - Does it have a translated title or a translated description?is_deleted- Does it have all empty fields or not? (Help:Boolean syntax)
Search order
The order parameter changes the order of the results. The following are the available values for this field.
id_asc- ID ascending.post_id- Post ID descending.post_id_desc- Post ID descending.post_id_asc- Post ID ascending.updated_at- Updated at descending.updated_at_desc- Updated at descending.updated_at_asc- Updated at ascending.custom- Help:Common URL parameters- In order to use this order,
search[id]must also be set with a list of comma-separated IDs.
Show
Returns a single artist commentary record.
| HTTP Method | GET |
| Base URL | /artist_commentaries/$id.json/posts/$post_id/artist_commentary.json |
| Type | read request |
| Description | $id is the artist commentary ID.$post_id is ID of the post that the commentary belongs to. |
Note: This does a redirect to the post with that commentary when using the HTML interface.
Create or Update
Creates or updates a single artist commentary record.
| HTTP Method | PUT |
| Base URL | /artist_commentaries/create_or_update.json/posts/$post_id/artist_commentary/create_or_update.json |
| Type | write request |
| Description | $post_id is ID of the post that the commentary belongs to. |
Create/update parameters
Artist commentary parameters take the following format (see Help:API Write Requests for more info):
artist_commentary[FIELD]=VALUE
- Required:
post_id- The post ID the commentary belongs to.- When using the
/posts/$post_id/version, the post ID is already set. - Optional
original_titleoriginal_descriptiontranslated_titletranslated_descriptionadd_commentary_tag- Add the commentary tag.add_commentary_request_tag- Add the commentary_request tag.add_commentary_check_tag- Add the commentary_check tag.add_partial_commentary_tag- Add the partial_commentary tag.remove_commentary_tag- Remove the commentary tag.remove_commentary_request_tag- Remove the commentary_request tag.remove_commentary_check_tag- Remove the commentary_check tag.remove_partial_commentary_tag- Remove the partial_commentary tag.
Revert
Reverts a single artist commentary record to a prior version.
| HTTP Method | PUT |
| Base URL | /artist_commentaries/$id/revert.json/posts/$post_id/artist_commentary/revert.json |
| Type | write request |
| Description | $id is the post ID (not the artist commentary ID).$post_id is ID of the post that the commentary belongs to. |
Revert parameters
- Required:
- version_id - The artist commentary version ID to revert to.
Note: The version ID may be passed along as a URL parameter instead of in the body.
