Miyuu's Image Board

api:post_flags

Table of Contents

•01. Record field format
•02. Associated attributes
•03. Nomenclature
•04. Index
•05. Show
•06. Create
•07. See also
•08. External links
[/ul]


The following includes the details of how to interface with the post flag 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]
reason
[/td]

[td]string[/td]

[td][/td]

[/tr]

[tr]

[td]
status
[/td]

[td]enum[/td]

[td]See "Status table":[#dtext-status] for list of acceptable values.[/td]

[/tr]

[tr]

[td]
is_resolved
[/td]

[td]boolean[/td]

[td][/td]

[/tr]

[tr]

[td]
creator_id
[/td]

[td]integer[/td]

[td]>0, limited to Moderator+ or the flag creator[/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]

Status

[table]

[thead]

[tr]

[th]Value[/th]

[th]Enum[/th]

[/tr]

[/thead]

[tbody]

[tr]

[td]0[/td]

[td]pending[/td]

[/tr]

[tr]

[td]1[/td]

[td]succeeded[/td]

[/tr]

[tr]

[td]2[/td]

[td]rejected[/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 flag belongs to.[/td]

[/tr]

[/tbody]

[/table]

Nomenclature

  • Plural form: "post flags"
•• Used in the URL pathname
  • Singular form: "post flag"
•• Used for write parameters (Help:API Write Requests)
  • Versions: none

Index

[table]

[tbody]

[tr]

[td]HTTP Method[/td]

[td]GET[/td]

[/tr]

[tr]

[td]Base URL[/td]

[td]

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

••
id

••
post_id

••
created_at

••
updated_at
••
reason
••
is_resolved
••
status
••
status

Special search parameters

  • reason_matches
    - Case-insensitive wildcard search on the reason field.
  • creator_id
    - Searches for flags by creator ID. Single ID only.
  • creator_name
    - Searches for flags by creator name. Single name only.
  • category_matches
    - Can be: normal, unapproved, rejected, 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]

/post_flags/$id.json
[/td]

[/tr]

[tr]

[td]Type[/td]

[td]read request[/td]

[/tr]

[tr]

[td]Description[/td]

[td]
$id
is the post flag ID.[/td]

[/tr]

[/tbody]

[/table]

Create

[table]

[tbody]

[tr]

[td]HTTP Method[/td]

[td]POST[/td]

[/tr]

[tr]

[td]Base URL[/td]

[td]

/post_flags.json
[/td]

[/tr]

[tr]

[td]Type[/td]

[td]write request[/td]

[/tr]

[/tbody]

[/table]

Create parameters

  • Required:
••
post_id

••
reason

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]