AniworldAI
Login Posts Comments Notes Artists Tags Pools Wiki Forum More »
Search Changes Help | Posts (0) History
  • Help
guro
scat
furry -rating:g

Recent Changes (all)

  • chinese food
  • gatopan 3
  • chongyang cake
  • dax the duck
  • festival
  • psyche (duet night abyss)
  • bakerarts7
  • chongyang festival
  • korikori brimella
  • good thighhighs day
  • kairi (kingdom hearts)
  • oguri cap (cinderella gray) (umamusume)
  • mega pokemon
  • tatsugiri
  • mega tatsugiri
  • carol (lilum)
  • teheperinko (heaven burns red)
  • magical uni (ensemble stars!)
  • unlimited infinite u (ensemble stars!)
  • nao (user yscg3873)
  • good heavens just look at the time (meme)
  • elizabeth maxwell
  • molly zhang
  • chinese clothes
  • verite (ensemble stars!)

Options

  • Wiki History
  • Discussions
  • What Links Here

api:favorite groups

Table of Contents
  • 1. Record field format
  • 2. Associated attributes
  • 3. Nomenclature
  • 4. Actions
    • 4.1. Index
    • 4.2. Show
    • 4.3. Create
    • 4.4. Update
    • 4.5. Add post
    • 4.6. Remove post
    • 4.7. Destroy
  • 5. See also
  • 6. External links

The following includes the details of how to interface with favorite groups records through the API.

Record field format

NameTypeDetails
idinteger>0
namestring
creator_idinteger>0
post_idsarrayintegers > 0
is_publicboolean
created_attimestamp
updated_attimestamp

Associated attributes

NameTypeAvailabilityNumberDetails
creatoruserrequiredsingle

Nomenclature

  • Plural form: "favorite_groups"
    • Used in the URL pathname
  • Singular form: "favorite_group"
    • Used for write parameters (Help:API Write Requests)
  • Versions: None

Actions

Index
HTTP MethodGET
Base URL/favorite_groups.json
Typeread request
DescriptionThe default order is ID descending.
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
    • name
  • User syntax
    • creator
  • Array syntax
    • post_ids
  • Boolean syntax
    • is_public
Special search parameters
  • name_contains - Normalized case-insensitive wildcard searching on the name text field.
  • order - Sets the order of the results.
    • name - Alphabetic order by name, then ID descending.
    • created_at - Orders by creation time descending.
    • updated_at - Orders by update time descending, then ID descending.
    • post_count - Orders by post count, then ID descending.
Show
HTTP MethodGET
Base URL/favorite_groups/$id.json
Typeread request
Description$id is the favorite group ID.
Create
HTTP MethodPOST
Base URL/favorite_groups.json
Typewrite request
Description
Create parameters
  • Required:
    • name
  • Optional:
    • post_ids - Uses URL array parameter format.
    • post_ids_string - Space delimited list of post IDs.
    • is_public - Only Gold+ users can set this to false.
Update
HTTP MethodPUT/PATCH
Base URL/favorite_groups/$id.json
Typewrite request
Description$id is the favorite group ID.
Update parameters

Accepts the same parameters as the create favorite group action. All parameters are optional.

Add post
HTTP MethodPUT
Base URL/favorite_groups/$id/add_post.json
Typewrite request
Description$id is the favorite group ID.
Add post parameters
  • Required:
    • post_id - The post ID to add to the favorite group.
Remove post
HTTP MethodPUT
Base URL/favorite_groups/$id/remove_post.json
Typewrite request
Description$id is the favorite group ID.
Remove post parameters
  • Required:
    • post_id - The post ID to remove from the favorite group.
Destroy
HTTP MethodDELETE
Base URL/favorite_groups/$id/destroy.json
Typewrite request
Description$id is the favorite group ID.

Note: Favorite group records are destroyed rather than deleted and cannot be viewed or retrieved later.

See also

  • Help:API
  • Help:Common URL Parameters

External links

Controllerhttps://github.com/danbooru/danbooru/blob/master/app/controllers/favorite_groups_controller.rb
Modelhttps://github.com/danbooru/danbooru/blob/master/app/models/favorite_group.rb
Policyhttps://github.com/danbooru/danbooru/blob/master/app/policies/favorite_group_policy.rb
Terms / Privacy / Upgrade / Автор зеркала /