LANraragi
GithubDemoDocker HubDiscord Server
Nightly Release
Nightly Release
  • LANraragi Documentation
  • Installing LANraragi
    • ❓Which installation method is best for me?
    • πŸͺŸLRR for Windows (Win10)
    • 🍎Homebrew (macOS)
    • 🐳Docker (All platforms)
    • πŸ› οΈSource Code (Linux/macOS)
    • 🐧Community (Linux)
    • πŸ‘ΏJail (FreeBSD)
  • Basic Operations
    • πŸš€Getting Started
    • πŸ“šReading Archives
    • βœ’οΈAdding Metadata
    • πŸ”ŽSearching the Archive Index
    • πŸ“ˆStatistics and Logs
    • πŸ–ŒοΈThemes
  • Advanced Usage
    • πŸ¦‡Batch Operations
    • πŸ“‚Categories
    • ⬇️Downloading Archives
    • πŸ’ΎBackup and Restore
    • πŸ“±Using External Readers
    • 🌐Network Interface Setup
    • πŸ•΅οΈProxy Setup
    • πŸ“Tag Rules
  • Developer Guide
    • πŸ—οΈSetup a Development Environment
    • πŸ›οΈArchitecture & Style
    • 🈁Translating LANraragi to other languages
  • API Documentation
    • πŸ”‘Getting started
    • Search API
    • Archive API
    • Database API
    • Category API
    • Tankoubon API
    • Shinobu API
    • Minion API
    • Miscellaneous other API
  • Writing Plugins
    • 🧩Getting started
    • Login Plugins
    • Metadata Plugins
    • Downloader Plugins
    • Generic Plugins ("Scripts")
    • Code Examples
Powered by GitBook
On this page
  • Get all categories
  • Get a single category
  • πŸ”‘Create a Category
  • πŸ”‘Update a Category
  • πŸ”‘Delete a Category
  • πŸ”‘Add an Archive to a Category
  • πŸ”‘Remove an Archive from a Category
  • Get bookmark link
  • πŸ”‘Update bookmark link
  • πŸ”‘Disable bookmark feature

Was this helpful?

  1. API Documentation

Category API

Get all categories

GET http://lrr.tvc-16.science/api/categories

Get all the categories saved on the server.

[
  {
    "archives": [],
    "id": "SET_1589227137",
    "name": "doujinshi πŸ’¦πŸ’¦πŸ’¦",
    "pinned": "1",
    "search": "doujinshi"
  },
  {
    "archives": [],
    "id": "SET_1589291510",
    "name": "All archives by uo denim",
    "pinned": "0",
    "search": "artist:uo denim"
  },
  {
    "archives": [
      "b835f24b953c236b7bbb22414e4f2f1f4b51891a",
      "9ed04c35aa41be137e3e696d2001a2f6d9cbd38d",
      "8b0b6bb3d180eff607c941755695c317570d8449",
      "a5c0958ad25642e2204aff09f2cc8e70870bd81f",
      "32f0edeb5d5b3cf71a02b39279a69d0a903e4aed"
    ],
    "id": "SET_1589493021",
    "name": "The very best",
    "pinned": "0",
    "search": ""
  }
]

Get a single category

GET http://lrr.tvc-16.science/api/categories/:id

Get the details of the specified category ID.

Path Parameters

Name
Type
Description

id*

string

ID of the Category desired.

{
  "archives": [],
  "id": "SET_1613080290",
  "name": "My great category",
  "pinned": "0",
  "search": ""
}
{
  "error": "The given category does not exist.",
  "operation": "get_category",
  "success": 0
}

πŸ”‘Create a Category

PUT http://lrr.tvc-16.science/api/categories

Create a new Category.

Query Parameters

Name
Type
Description

pinned

boolean

Add this parameter if you want the created category to be pinned.

search

string

Matching predicate, if creating a Dynamic Category.

name*

string

Name of the Category.

{
  "category_id": "SET_1589383525",
  "operation": "create_category",
  "success": 1
}
{
  "error": "Category name not specified.",
  "operation": "create_category",
  "success": 0
}

πŸ”‘Update a Category

PUT http://lrr.tvc-16.science/api/categories/:id

Modify a Category.

Path Parameters

Name
Type
Description

id*

string

ID of the Category to update.

Query Parameters

Name
Type
Description

name

string

New name of the Category

search

string

Predicate. Trying to add a predicate to a category that already contains Archives will give you an error.

pinned

boolean

Add this argument to pin the Category.

\

If you don't, the category will be unpinned on update.

{
  "category_id": "SET_1589573608",
  "operation": "update_category",
  "success": 1
}
{
  "error": "The given category does not exist.",
  "operation": "update_category",
  "success": 0
}

πŸ”‘Delete a Category

DELETE http://lrr.tvc-16.science/api/categories/:id

Remove a Category.

Path Parameters

Name
Type
Description

id*

string

ID of the Category to delete.

{
  "operation": "delete_category",
  "success": 1
}

πŸ”‘Add an Archive to a Category

PUT http://lrr.tvc-16.science/api/categories/:id/:archive

Adds the specified Archive ID (see Archive API) to the given Category.

Path Parameters

Name
Type
Description

id*

string

Category ID to add the Archive to.

archive*

string

Archive ID to add.

{
  "operation": "add_to_category",
  "success": 1,
  "successMessage": "Added \"Name of archive\" to category \"Name of category\""
}

πŸ”‘Remove an Archive from a Category

DELETE http://lrr.tvc-16.science/api/categories/:id/:archive

Remove an Archive ID from a Category.

Path Parameters

Name
Type
Description

id*

string

Category ID

archive*

string

Archive ID

{
  "operation": "remove_from_category",
  "success": 1
}

Get bookmark link

GET http://lrr.tvc-16.science/api/categories/bookmark_link

Retrieves the ID of the category currently linked to the bookmark feature. Returns an empty string if no category is linked.

{
  "category_id": "SET_1744272066",
  "operation": "get_bookmark_link",
  "success": 1
}

πŸ”‘Update bookmark link

PUT http://lrr.tvc-16.science/api/categories/bookmark_link/:id

Links the bookmark feature to the specified static category. This determines which category archives are added to when using the bookmark button.

Path Parameters

Name
Type
Description

id*

string

ID of the static category to link with the bookmark feature.

{
  "category_id": "SET_1744272066",
  "operation": "update_bookmark_link",
  "success": 1
}
{
  "category_id": "SET_1744272066",
  "operation": "update_bookmark_link",
  "success": 0,
  "error": "Input category ID is invalid."
}
{
  "category_id": "SET_1744272066",
  "operation": "update_bookmark_link",
  "success": 0,
  "error": "Cannot link bookmark to a dynamic category."
}
{
  "category_id": "SET_1744272066",
  "operation": "update_bookmark_link",
  "success": 0,
  "error": "Category does not exist!"
}

πŸ”‘Disable bookmark feature

DELETE http://lrr.tvc-16.science/api/categories/bookmark_link

Disables the bookmark feature by removing the link to any category. Returns the ID of the previously linked category.

{
  "category_id": "SET_1744272332",
  "operation": "remove_bookmark_link",
  "success": 1
}
PreviousDatabase APINextTankoubon API

Last updated 25 days ago

Was this helpful?