Miyuu's Image Board

api:tags

Table of Contents
  • 1. Record field format
  • 2. Associated attributes
  • 3. Nomenclature
  • 4. Index
  • 5. Show
  • 6. Update
  • 7. See also
  • 8. External links
  • The following includes the details of how to interface with the tag 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]
    name
    [/td]

    [td]string[/td]

    [td][/td]

    [/tr]

    [tr]

    [td]
    category
    [/td]

    [td]integer[/td]

    [td]includes [0,1,3,4,5][/td]

    [/tr]

    [tr]

    [td]
    post_count
    [/td]

    [td]integer[/td]

    [td]>=0[/td]

    [/tr]

    [tr]

    [td]
    is_deprecated
    [/td]

    [td]boolean[/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]

    Category

    [table]

    [thead]

    [tr]

    [th]Value[/th]

    [th]Description[/th]

    [/tr]

    [/thead]

    [tbody]

    [tr]

    [td]0[/td]

    [td]General[/td]

    [/tr]

    [tr]

    [td]1[/td]

    [td]Artist[/td]

    [/tr]

    [tr]

    [td]3[/td]

    [td]Copyright[/td]

    [/tr]

    [tr]

    [td]4[/td]

    [td]Character[/td]

    [/tr]

    [tr]

    [td]5[/td]

    [td]Meta[/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]

    wiki_page
    [/td]

    [td]wiki page[/td]

    [td]single[/td]

    [td]optional[/td]

    [td]Wiki page whose title matches the tag name.[/td]

    [/tr]

    [tr]

    [td]
    artist
    [/td]

    [td]artist[/td]

    [td]single[/td]

    [td]optional[/td]

    [td]Artist whose name matches the tag name.[/td]

    [/tr]

    [tr]

    [td]
    antecedent_alias
    [/td]

    [td]tag alias[/td]

    [td]single[/td]

    [td]optional[/td]

    [td]Alias where the tag is the antecedent.[/td]

    [/tr]

    [tr]

    [td]
    consequent_aliases
    [/td]

    [td]tag alias[/td]

    [td]multiple[/td]

    [td]optional[/td]

    [td]Aliases where the tag is the consequent.[/td]

    [/tr]

    [tr]

    [td]
    antecedent_implications
    [/td]

    [td]tag implication[/td]

    [td]multiple[/td]

    [td]optional[/td]

    [td]Implications where the tag is the antecedent.[/td]

    [/tr]

    [tr]

    [td]
    consequent_implications
    [/td]

    [td]tag implication[/td]

    [td]multiple[/td]

    [td]optional[/td]

    [td]Implications where the tag is the consequent.[/td]

    [/tr]

    [tr]

    [td]
    dtext_links
    [/td]

    [td]dtext link[/td]

    [td]multiple[/td]

    [td]optional[/td]

    [td]Dtext links to the page whose title matches the tag name.[/td]

    [/tr]

    [/tbody]

    [/table]

    Nomenclature

    • Plural form: "tags"
      • Used in the URL pathname
    • Singular form: "tag"
    • Versions: none

    Index

    [table]

    [tbody]

    [tr]

    [td]HTTP Method[/td]

    [td]GET[/td]

    [/tr]

    [tr]

    [td]Base URL[/td]

    [td]

    /tags.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

    • fuzzy_name_matches
      - Shows tags with names that are within a certain percentage of similarity.
    • name_matches
      - Normalized wildcard search on the name field.
    • name_normalize
      - Normalized wildcard search on the name field that supports multiple tags split by a comma ",".
    • name_or_alias_matches
      - Normalized wildcard search on the name field that also checks for aliases where the search term is the antecedent.
    • hide_empty
      - Shows only tags that have a post count greater than 0 (Help:Boolean syntax).

    Search order

    Using the search parameter

    order
    with one of the following values changes the order of the results.

    • name
      - Alphabetical order on the name.
    • date
      - Orders by ID descending.
    • count
      - Orders by post count.
    • similarity
      - Orders by similarity to the search term.
      • Only when the
        fuzzy_name_matches
        parameter is used.

    Show

    [table]

    [tbody]

    [tr]

    [td]HTTP Method[/td]

    [td]GET[/td]

    [/tr]

    [tr]

    [td]Base URL[/td]

    [td]

    /tags/$id.json
    [/td]

    [/tr]

    [tr]

    [td]Type[/td]

    [td]read request[/td]

    [/tr]

    [tr]

    [td]Description[/td]

    [td]
    $id
    is the tag ID.[/td]

    [/tr]

    [/tbody]

    [/table]

    Update

    [table]

    [tbody]

    [tr]

    [td]HTTP Method[/td]

    [td]PUT/PATCH[/td]

    [/tr]

    [tr]

    [td]Base URL[/td]

    [td]

    /tags/$id.json
    [/td]

    [/tr]

    [tr]

    [td]Type[/td]

    [td]write request[/td]

    [/tr]

    [tr]

    [td]Description[/td]

    [td]
    $id
    is the tag ID.[/td]

    [/tr]

    [/tbody]

    [/table]

    Update parameters

    • Optional:
      • is_deprecated
        • can only be set to
          false
          by admins
        • can only be set to
          true
          if the tag has a wiki page, and either its post count is zero or the user is an admin
      • category
        Restricted by user level
        • Member+: < 50 posts
        • Builder+: < 1000 posts
        • Admin+: No limit

    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]