api:artist_commentaries
Table of Contents
* 01. "Record field format":#dtext-record* 02. "Associated attributes":#dtext-associations
* 03. "Nomenclature":#dtext-nomenclature
* 04. "Index":#dtext-index
* 05. "Show":#dtext-show
* 06. "Create or update":#dtext-create-or-update
* 07. "Revert":#dtext-revert
* 08. "See also":#dtext-see-also
The following includes the details of how to interface with the artist commentary records through the API.
h4#record. 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]
h4#associations. 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]
h4#nomenclature. Nomenclature
* Plural form: "artist_commentaries"
** Used in the URL pathname
* Singular form: "artist_commentary"
** Used for write parameters (Help:API Write Requests)
* Versions: API:Artist commentary versions
h4#index. 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]
h5#search-attributes. Search attributes
All of the following are standard attributes with all of their available formats and qualifiers.
* Number syntax
**
id**
created_at**
updated_at* Text syntax
**
original_title**
original_description**
translated_title**
translated_description* Post syntax
**
post
h5#special-search-parameters. Special search parameters
*
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 (yes or no) - Does it have all empty fields or not?
h5. Search order
The search order can only be changed with the custom parameter.
h4#show. 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.
h3#create-or-update. 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]
h5#create-update-parameters. Create/update parameters
* 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.
h4#revert. 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]
h5#revert-parameters. 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.
h4#see-also. See also
* Help:Common URL Parameters
* Help:API
h4#external-links. 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]