api:artist_commentaries
Table of Contents
- 01. Record field format
- 02. Associated attributes
- 03. Nomenclature
- 04. Index
- 05. Show
- 06. Create or update
- 07. Revert
- 08. See also
The following includes the details of how to interface with the artist commentary records through the API.
Record field format
¶
[table]
[thead]
[tr]
[th]Name[/th]
[th]Type[/th]
[th]Details[/th]
[/tr]
[/thead]
[tbody]
[tr]
[td]
id[/td][td]integer[/td]
[td]>0[/td]
[/tr]
[tr]
[td]
post_id[/td][td]integer[/td]
[td]>0[/td]
[/tr]
[tr]
[td]
original_title[/td][td]string[/td]
[td][/td]
[/tr]
[tr]
[td]
original_description[/td][td]string[/td]
[td][/td]
[/tr]
[tr]
[td]
translated_title[/td][td]string[/td]
[td][/td]
[/tr]
[tr]
[td]
translated_description[/td][td]string[/td]
[td][/td]
[/tr]
[tr]
[td]
created_at[/td][td]timestamp[/td]
[td][/td]
[/tr]
[tr]
[td]
updated_at[/td][td]timestamp[/td]
[td][/td]
[/tr]
[/tbody]
[/table]
Associated attributes
¶
[table]
[thead]
[tr]
[th]Name[/th]
[th]Type[/th]
[th]Number[/th]
[th]Availability[/th]
[th]Details[/th]
[/tr]
[/thead]
[tbody]
[tr]
[td]
post[/td][td]post[/td]
[td]single[/td]
[td]required[/td]
[td]Post that the artist commentary belongs to.[/td]
[/tr]
[/tbody]
[/table]
Nomenclature
¶
- Plural form: "artist_commentaries"
- Singular form: "artist_commentary"
- Versions: API:Artist commentary versions
Index
¶
[table]
[tbody]
[tr]
[td]HTTP Method[/td]
[td]GET[/td]
[/tr]
[tr]
[td]Base URL[/td]
[td]
/artist_commentaries.json[/td][/tr]
[tr]
[td]Type[/td]
[td]read request[/td]
[/tr]
[tr]
[td]Description[/td]
[td]The default order is ID descending.[/td]
[/tr]
[/tbody]
[/table]
All of the following are standard attributes with all of their available formats and qualifiers.
••id
••
created_at
••
updated_at
•• original_title
••
original_description
••
translated_title
••
translated_description
•• post
- Case-insensitive wildcard searching on any of the text fields.text_matches
(boolean syntax) - Does it have an original title or an original description?original_present
(boolean syntax) - Does it have a translated title or a translated description?translated_present
(yes or no) - Does it have all empty fields or not?is_deleted
Search order
The search order can only be changed with the custom parameter.
Show
¶
[table]
[tbody]
[tr]
[td]HTTP Method[/td]
[td]GET[/td]
[/tr]
[tr]
[td]Base URL[/td]
[td]
/artist_commentaries/$id.json[br]/posts/$post_id/artist_commentary.json[/td][/tr]
[tr]
[td]Type[/td]
[td]read request[/td]
[/tr]
[tr]
[td]Description[/td]
[td]
$id is the artist commentary ID.[br]$post_id is ID of the post that the commentary belongs to.[/td][/tr]
[/tbody]
[/table]
Note: This does a redirect to the post with that commentary when using the HTML interface.
Create or Update
¶
[table]
[tbody]
[tr]
[td]HTTP Method[/td]
[td]PUT[/td]
[/tr]
[tr]
[td]Base URL[/td]
[td]
/artist_commentaries/create_or_update.json[br]/posts/$post_id/artist_commentary/create_or_update.json[/td][/tr]
[tr]
[td]Type[/td]
[td]write request[/td]
[/tr]
[tr]
[td]Description[/td]
[td]
$post_id is ID of the post that the commentary belongs to.[/td][/tr]
[/tbody]
[/table]
- 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_title
••
original_description
••
translated_title
••
translated_description
••
add_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
¶
[table]
[tbody]
[tr]
[td]HTTP Method[/td]
[td]PUT[/td]
[/tr]
[tr]
[td]Base URL[/td]
[td]
/artist_commentaries/$id/revert.json[br]/posts/$post_id/artist_commentary/revert.json[/td][/tr]
[tr]
[td]Type[/td]
[td]write request[/td]
[/tr]
[tr]
[td]Description[/td]
[td]
$id is the post ID (not the artist commentary ID).[br]$post_id is ID of the post that the commentary belongs to.[/td][/tr]
[/tbody]
[/table]
Revert parameters
¶
- Required:
Note: The version ID may be passed along as a URL parameter instead of in the body.
See also
¶
External links
¶
[table]
[tbody]
[tr]
[td]Controller[/td]
[td]
[td][/td]
[/tr]
[tr]
[td]Model[/td]
[td]
[/tr]
[tr]
[td]Policy[/td]
[td]
[/tr]
[/tbody]
[/table]