Miyuu's Image Board

api:artist_commentaries

Table of Contents
  • 1. Create or Update
  • 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

    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]

    Search attributes

    All of the following are standard attributes with all of their available formats and qualifiers.

    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?

    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]

    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

    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:
      • 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.

    See also

    [table]

    [tbody]

    [tr]

    [td]Controller[/td]

    [td][/td]

    [td][/td]

    [/tr]

    [tr]

    [td]Model[/td]

    [td][/td]

    [/tr]

    [tr]

    [td]Policy[/td]

    [td][/td]

    [/tr]

    [/tbody]

    [/table]