### Tanoshi Configuration File Example Source: https://context7.com/anujsreedharan/tanoshi/llms.txt Example YAML configuration for the Tanoshi server, covering port, database path, JWT secret, plugin paths, cache settings, and optional Telegram integration. ```yaml # Server port (default: 80) port: 3030 # Absolute path to SQLite database database_path: /home/user/.tanoshi/tanoshi.db # JWT secret key (auto-generated if not specified) # Changing this invalidates all existing tokens secret: your-secret-key-here # Path to extension plugins directory plugin_path: /home/user/.tanoshi/plugins # Cache TTL in hours (default: 1) cache_ttl: 1 # Update check interval in hours (default: 1) update_interval: 1 # Optional Telegram bot token for notifications telegram_token: null # Optional base URL for reverse proxy setups base_url: https://manga.example.com # Per-plugin configuration (passed to extensions during load) plugin_config: mangadex: language: en data_saver: false ``` -------------------------------- ### GET /api/source Source: https://context7.com/anujsreedharan/tanoshi/llms.txt Lists all available manga sources and their installation status. ```APIDOC ## GET /api/source ### Description Retrieves a list of all available manga sources, including their installation status and update availability. ### Method GET ### Endpoint /api/source ### Response #### Success Response (200) - **sources** (array) - List of source objects - **status** (string) - Success status ### Response Example { "sources": [ { "name": "mangadex", "path": "libmangadex.so", "installed": true, "update": true } ], "status": "success" } ``` -------------------------------- ### GET /version Source: https://context7.com/anujsreedharan/tanoshi/llms.txt Checks the current server version. ```APIDOC ## GET /version ### Description Check the server version. ### Method GET ### Endpoint /version ### Response #### Success Response (200) - **version** (string) - The current server version in plain text ``` -------------------------------- ### Manage Manga Sources Source: https://context7.com/anujsreedharan/tanoshi/llms.txt Endpoints to list, install, and authenticate with dynamic library manga source plugins. ```bash # List all available sources (shows installed status and available updates) curl -X GET http://localhost:3030/api/source # Response: # { # "sources": [ # { # "name": "mangadex", # "path": "libmangadex.so", # "rustc_version": "1.48.0", # "core_version": "0.14.0", # "installed_version": "0.1.0", # "version": "0.1.1", # "installed": true, # "update": true # }, # { # "name": "local", # "path": "liblocal.so", # "rustc_version": "1.48.0", # "core_version": "0.14.0", # "installed_version": "", # "version": "0.1.0", # "installed": false, # "update": false # } # ], # "status": "success" # } # Install a source plugin (downloads and loads the extension) curl -X POST http://localhost:3030/api/source/install/mangadex # Login to a source that requires authentication (e.g., MangaDex) curl -X POST http://localhost:3030/api/login/mangadex \ -H "Content-Type: application/json" \ -d '{ "username": "mangadex_user", "password": "mangadex_pass", "remember_me": true, "two_factor": null }' # Response: # { # "source_name": "mangadex", # "auth_type": "session", # "value": "session_token_value" # } ``` -------------------------------- ### Configure Tanoshi Source: https://github.com/anujsreedharan/tanoshi/blob/master/README.md Example configuration file for setting the server port, database path, JWT secret, and plugin storage location. ```yaml # Port for tanoshi to server, default to 80 port: 3030 # Absolute path to database database_path: /path/to/database # JWT secret, any random value, changing this will render any active token invalid secret: secret # Absolute path to where plugin is stored plugin_path: /home/user/.tanoshi/plugins ``` -------------------------------- ### GET /api/source/{source_name} Source: https://context7.com/anujsreedharan/tanoshi/llms.txt Browses and searches manga from a specific installed source. ```APIDOC ## GET /api/source/{source_name} ### Description Lists manga from a specific source with support for search and pagination. ### Method GET ### Endpoint /api/source/{source_name} ### Path Parameters - **source_name** (string) - Required - The name of the manga source ### Query Parameters - **keyword** (string) - Optional - Search term - **page** (integer) - Optional - Page number - **sort_by** (string) - Optional - Sort criteria (LastUpdated, Title, Comment, Views) - **sort_order** (string) - Optional - Sort order (Asc, Desc) - **refresh** (boolean) - Optional - Force refresh from source ### Response #### Success Response (200) - **mangas** (array) - List of manga objects ``` -------------------------------- ### Check Server Version Source: https://context7.com/anujsreedharan/tanoshi/llms.txt A simple GET request to check the server's current version. Returns plain text. ```bash curl -X GET http://localhost:3030/version ``` -------------------------------- ### Get Chapter Updates Source: https://context7.com/anujsreedharan/tanoshi/llms.txt Retrieve paginated updates for favorite manga. Requires JWT authorization. ```bash # Get chapter updates for favorites (paginated) curl -X GET "http://localhost:3030/api/updates?page=1" \ -H "Authorization: " ``` -------------------------------- ### Get Detailed Manga Information Source: https://context7.com/anujsreedharan/tanoshi/llms.txt Retrieve comprehensive details for a specific manga by its ID. Requires an Authorization header. ```bash curl -X GET http://localhost:3030/api/manga/1 \ -H "Authorization: " ``` -------------------------------- ### Get All Chapters for a Manga Source: https://context7.com/anujsreedharan/tanoshi/llms.txt Fetch a list of all chapters for a given manga. The `refresh` parameter can be used to force an update from the source. Requires an Authorization header. ```bash curl -X GET "http://localhost:3030/api/manga/1/chapter?refresh=false" \ -H "Authorization: " ``` -------------------------------- ### Custom Manga Source Extension (Rust) Source: https://context7.com/anujsreedharan/tanoshi/llms.txt Example Rust code for creating a custom manga source extension. Implements the `Extension` trait to define methods for fetching manga, chapters, and pages. Requires `tanoshi_lib`. ```rust use tanoshi_lib::manga::{Chapter, Manga, Params, Source, SourceLogin, SourceLoginResult}; use tanoshi_lib::extensions::Extension; use tanoshi_lib::export_plugin; use anyhow::Result; pub struct MyMangaSource; impl Extension for MyMangaSource { // Return source metadata fn info(&self) -> Source { Source { name: "mysource".to_string(), url: "https://mysource.com".to_string(), version: "0.1.0".to_string(), } } // List/search manga from source fn get_mangas(&self, param: Params, auth: String) -> Result> { let mut mangas = Vec::new(); // Fetch from source API or scrape HTML // Use param.keyword for search, param.page for pagination mangas.push(Manga { id: 0, // Set by server source: "mysource".to_string(), title: "Example Manga".to_string(), author: vec!["Author Name".to_string()], genre: vec!["Action".to_string()], status: Some("Ongoing".to_string()), description: Some("Manga description".to_string()), path: "/manga/example".to_string(), thumbnail_url: "https://mysource.com/cover.jpg".to_string(), last_read: None, last_page: None, is_favorite: false, }); Ok(mangas) } // Get full manga details fn get_manga_info(&self, path: &String) -> Result { // Fetch detailed info for manga at given path Ok(Manga::default()) } // Get chapter list for manga fn get_chapters(&self, path: &String) -> Result> { // Return chapters sorted by number/date Ok(vec![]) } // Get page URLs for chapter fn get_pages(&self, path: &String) -> Result> { // Return list of image URLs Ok(vec![ "https://mysource.com/page1.jpg".to_string(), "https://mysource.com/page2.jpg".to_string(), ]) } // Optional: Handle source authentication fn login(&self, login_info: SourceLogin) -> Result { Ok(SourceLoginResult { source_name: "mysource".to_string(), auth_type: "bearer".to_string(), value: "token_value".to_string(), }) } } // Register the extension fn register(registrar: &mut dyn tanoshi_lib::extensions::PluginRegistrar, _config: Option<&serde_yaml::Value>) { registrar.register_function("mysource", Box::new(MyMangaSource)); } export_plugin!("mysource", register); ``` -------------------------------- ### Get Read Data for a Chapter Source: https://context7.com/anujsreedharan/tanoshi/llms.txt Consolidate manga info, chapters, current chapter, and pages needed for the reader view in a single request. Requires an Authorization header. ```bash curl -X GET "http://localhost:3030/api/read/100?refresh=false" \ -H "Authorization: " ``` -------------------------------- ### Get Pages for a Chapter Source: https://context7.com/anujsreedharan/tanoshi/llms.txt Retrieve the list of pages for a specific chapter. The `refresh` parameter can be used to force an update from the source. ```bash curl -X GET "http://localhost:3030/api/chapter/100?refresh=false" ``` -------------------------------- ### GET /api/updates Source: https://context7.com/anujsreedharan/tanoshi/llms.txt Retrieves paginated chapter updates for favorite manga. ```APIDOC ## GET /api/updates ### Description Get chapter updates for favorite manga. ### Method GET ### Endpoint /api/updates ### Parameters #### Query Parameters - **page** (integer) - Required - The page number for pagination ### Response #### Success Response (200) - **updates** (array) - List of manga updates - **status** (string) - Status message #### Response Example { "updates": [ { "manga_id": 1, "title": "One Piece", "thumbnail_url": "https://...", "number": "1050", "chapter_id": 100, "uploaded": "2023-01-15T10:30:00" } ], "status": "success" } ``` -------------------------------- ### Browse Manga Content Source: https://context7.com/anujsreedharan/tanoshi/llms.txt Endpoint for searching and paginating manga from installed sources. Requires both a user JWT and a source-specific session token if applicable. ```bash # List mangas from a source with search and pagination curl -X GET "http://localhost:3030/api/source/mangadex?keyword=one%20piece&page=1&sort_by=LastUpdated&sort_order=Desc" \ -H "Authorization: " \ -H "sourceauthorization: " # Query parameters: # - keyword: Search term (optional) # - page: Page number for pagination (optional) # - sort_by: LastUpdated, Title, Comment, Views (optional) # - sort_order: Asc, Desc (optional) # - refresh: true/false - Force refresh from source (optional) # Response: # { # "mangas": [ # { # "id": 1, # "source": "mangadex", ``` -------------------------------- ### Get Reading History Source: https://context7.com/anujsreedharan/tanoshi/llms.txt Retrieve the user's reading history, paginated with 10 items per page. Requires an Authorization header. ```bash curl -X GET "http://localhost:3030/api/history?page=1" \ -H "Authorization: " ``` -------------------------------- ### Get Proxied Page Image Source: https://context7.com/anujsreedharan/tanoshi/llms.txt Retrieve a proxied image for a specific page. The Content-Type header in the response indicates the image format. ```bash curl -X GET http://localhost:3030/api/page/1001 --output page1.jpg ``` -------------------------------- ### Get User's Favorite Manga Source: https://context7.com/anujsreedharan/tanoshi/llms.txt Retrieve the user's list of favorite manga, with options to sort by 'LastUpdated' in ascending or descending order. Requires an Authorization header. ```bash curl -X GET "http://localhost:3030/api/favorites?sort_by=LastUpdated&sort_order=Desc" \ -H "Authorization: " ``` -------------------------------- ### Build Frontend Source: https://github.com/anujsreedharan/tanoshi/blob/master/README.md Commands to prepare the frontend environment and build the static assets. ```bash cd tanoshi-web ``` ```bash yarn install ``` ```bash cargo install wasm-bindgen-cli wasm-pack ``` ```bash yarn build ``` -------------------------------- ### View CLI Help Source: https://github.com/anujsreedharan/tanoshi/blob/master/README.md Displays the command-line interface usage and available options for the Tanoshi binary. ```text tanoshi USAGE: tanoshi [FLAGS] [OPTIONS] FLAGS: -h, --help Prints help information -V, --version Prints version information OPTIONS: --config Path to config file ``` -------------------------------- ### Build Backend Source: https://github.com/anujsreedharan/tanoshi/blob/master/README.md Commands to compile the Rust backend. ```bash cd tanoshi ``` ```bash cargo build ``` -------------------------------- ### Build Tanoshi from Source Source: https://context7.com/anujsreedharan/tanoshi/llms.txt Commands to build the Tanoshi WebAssembly frontend and Rust backend. Frontend build is required first. The backend is built in release mode. ```bash # Build frontend (required first - embedded in server binary) cd tanoshi-web yarn install cargo install wasm-bindgen-cli wasm-pack yarn build # Build backend cd ../tanoshi cargo build --release # Run server ./target/release/tanoshi --config /path/to/config.yml ``` -------------------------------- ### Manage Authentication via API Source: https://context7.com/anujsreedharan/tanoshi/llms.txt Endpoints for user login, token validation, registration, and account management. Requires a valid JWT token in the Authorization header for protected routes. ```bash # Login - Returns JWT token for authenticated requests curl -X POST http://localhost:3030/api/login \ -H "Content-Type: application/json" \ -d '{"username": "admin", "password": "admin", "role": "ADMIN"}' # Response: # { # "claim": {"sub": "admin", "role": "ADMIN", "exp": 10000000000}, # "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", # "status": "success" # } # Validate token - Check if current token is valid curl -X GET http://localhost:3030/api/validate \ -H "Authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." # Register new user (requires admin role) curl -X POST http://localhost:3030/api/register \ -H "Content-Type: application/json" \ -H "Authorization: " \ -d '{"username": "reader1", "password": "mypassword", "role": "READER"}' # Response: {"claim": null, "token": null, "status": "success"} # List all users (admin only) curl -X GET http://localhost:3030/api/user \ -H "Authorization: " # Response: {"users": [{"username": "admin", "role": "ADMIN"}, {"username": "reader1", "role": "READER"}]} # Change password (authenticated user changes own password) curl -X PUT http://localhost:3030/api/user/password \ -H "Authorization: " \ -H "Content-Type: text/plain" \ -d 'newpassword123' # Modify user role (admin only) curl -X PUT http://localhost:3030/api/user/role \ -H "Content-Type: application/json" \ -H "Authorization: " \ -d '{"username": "reader1", "role": "ADMIN"}' ``` -------------------------------- ### Record Reading Progress Source: https://context7.com/anujsreedharan/tanoshi/llms.txt Use this endpoint to record a user's reading progress for a specific chapter. Requires JWT authorization and JSON content type. ```bash curl -X POST http://localhost:3030/api/history \ -H "Authorization: " \ -H "Content-Type: application/json" \ -d '{ "chapter_id": 100, "read": 20, "at": "2023-01-16T15:45:00" }' ``` -------------------------------- ### POST /api/login Source: https://context7.com/anujsreedharan/tanoshi/llms.txt Authenticates a user and returns a JWT token for subsequent requests. ```APIDOC ## POST /api/login ### Description Authenticates a user and returns a JWT token. ### Method POST ### Endpoint /api/login ### Request Body - **username** (string) - Required - Username - **password** (string) - Required - Password - **role** (string) - Required - User role (e.g., ADMIN) ### Response #### Success Response (200) - **claim** (object) - JWT claims - **token** (string) - JWT token - **status** (string) - Success status ### Response Example { "claim": {"sub": "admin", "role": "ADMIN", "exp": 10000000000}, "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "status": "success" } ``` -------------------------------- ### Chapter API Source: https://context7.com/anujsreedharan/tanoshi/llms.txt Retrieve chapter lists and pages for reading manga. ```APIDOC ## GET /api/manga/{id}/chapter ### Description Get all chapters for a specific manga. ### Method GET ### Endpoint /api/manga/{id}/chapter ### Parameters #### Path Parameters - **id** (integer) - Required - The ID of the manga. #### Query Parameters - **refresh** (boolean) - Optional - If true, forces a refresh of the chapter list from the source. ### Request Example ```bash curl -X GET "http://localhost:3030/api/manga/1/chapter?refresh=false" \ -H "Authorization: " ``` ### Response #### Success Response (200) - **chapters** (array of objects) - A list of chapters for the manga. - **id** (integer) - The unique identifier for the chapter. - **source** (string) - The source of the chapter data. - **manga_id** (integer) - The ID of the manga this chapter belongs to. - **vol** (string) - The volume number of the chapter. - **no** (string) - The chapter number. - **title** (string) - The title of the chapter. - **path** (string) - The path to the chapter on the source. - **read** (integer or null) - The last read page number for this chapter or null. - **uploaded** (string) - The date and time the chapter was uploaded (ISO 8601 format). - **status** (string) - The status of the request (e.g., "success"). #### Response Example ```json { "chapters": [ { "id": 100, "source": "mangadex", "manga_id": 1, "vol": "100", "no": "1050", "title": "The Drums of Liberation", "path": "/chapter/67890", "read": 15, "uploaded": "2023-01-15T10:30:00" }, { "id": 99, "source": "mangadex", "manga_id": 1, "vol": "100", "no": "1049", "title": "The World We Should Aspire To", "path": "/chapter/67889", "read": null, "uploaded": "2023-01-08T10:30:00" } ], "status": "success" } ``` ## GET /api/chapter/{id} ### Description Get the pages for a specific chapter. ### Method GET ### Endpoint /api/chapter/{id} ### Parameters #### Path Parameters - **id** (integer) - Required - The ID of the chapter. #### Query Parameters - **refresh** (boolean) - Optional - If true, forces a refresh of the chapter pages from the source. ### Request Example ```bash curl -X GET "http://localhost:3030/api/chapter/100?refresh=false" ``` ### Response #### Success Response (200) - **manga_id** (integer) - The ID of the manga the chapter belongs to. - **pages** (array of strings) - A list of paths to the page images for the chapter. - **status** (string) - The status of the request (e.g., "success"). #### Response Example ```json { "manga_id": 1, "pages": [ "/api/page/1001", "/api/page/1002", "/api/page/1003" ], "status": "success" } ``` ## GET /api/page/{id} ### Description Get a proxied page image. This endpoint handles source-specific headers and authentication. ### Method GET ### Endpoint /api/page/{id} ### Parameters #### Path Parameters - **id** (integer) - Required - The ID of the page. ### Request Example ```bash curl -X GET http://localhost:3030/api/page/1001 --output page1.jpg ``` ### Response - The response will be the image data. The `Content-Type` header will indicate the image type (e.g., `image/jpeg`, `image/png`). ``` -------------------------------- ### History API Source: https://context7.com/anujsreedharan/tanoshi/llms.txt Track and sync reading progress across devices. ```APIDOC ## GET /api/history ### Description Get the user's reading history, with pagination. ### Method GET ### Endpoint /api/history ### Parameters #### Query Parameters - **page** (integer) - Optional - The page number for pagination. Defaults to 1. Each page contains 10 items. ### Request Example ```bash curl -X GET "http://localhost:3030/api/history?page=1" \ -H "Authorization: " ``` ### Response #### Success Response (200) - **history** (array of objects) - A list of reading history entries. - **manga_id** (integer) - The ID of the manga. - **title** (string) - The title of the manga. - **thumbnail_url** (string) - URL for the manga's thumbnail image. - **chapter** (string) - The chapter number that was read. - **chapter_id** (integer) - The ID of the chapter that was read. - **read** (integer) - The last read page number in that chapter. - **at** (string) - The timestamp when the reading activity occurred (ISO 8601 format). - **status** (string) - The status of the request (e.g., "success"). #### Response Example ```json { "history": [ { "manga_id": 1, "title": "One Piece", "thumbnail_url": "https://...", "chapter": "1050", "chapter_id": 100, "read": 15, "at": "2023-01-16T14:30:00" } ], "status": "success" } ``` ``` -------------------------------- ### Add Manga to Favorites Source: https://context7.com/anujsreedharan/tanoshi/llms.txt Add a specific manga to the user's favorites list. Requires an Authorization header. ```bash curl -X POST http://localhost:3030/api/favorites/manga/1 \ -H "Authorization: " ``` -------------------------------- ### POST /api/history Source: https://context7.com/anujsreedharan/tanoshi/llms.txt Records the reading progress for a specific chapter. ```APIDOC ## POST /api/history ### Description Records the reading progress for a specific chapter. ### Method POST ### Endpoint /api/history ### Request Body - **chapter_id** (integer) - Required - The ID of the chapter being read - **read** (integer) - Required - The page number or progress indicator - **at** (string) - Required - ISO 8601 timestamp of the reading event ### Request Example { "chapter_id": 100, "read": 20, "at": "2023-01-16T15:45:00" } ### Response #### Success Response (200) - **history** (array) - List of history records - **status** (string) - Status message #### Response Example { "history": [], "status": "success" } ``` -------------------------------- ### Read API Source: https://context7.com/anujsreedharan/tanoshi/llms.txt Provides consolidated data for the reader view. ```APIDOC ## GET /api/read/{chapter_id} ### Description Get all data needed to read a specific chapter in one request, including manga info, chapters, current chapter details, and pages. ### Method GET ### Endpoint /api/read/{chapter_id} ### Parameters #### Path Parameters - **chapter_id** (integer) - Required - The ID of the chapter to read. #### Query Parameters - **refresh** (boolean) - Optional - If true, forces a refresh of the data from the source. ### Request Example ```bash curl -X GET "http://localhost:3030/api/read/100?refresh=false" \ -H "Authorization: " ``` ### Response #### Success Response (200) - **manga** (object) - Detailed information about the manga. - **chapters** (array of objects) - A list of chapters for the manga. - **chapter** (object) - Details of the current chapter being read. - **pages** (array of strings) - A list of paths to the page images for the chapter. #### Response Example ```json { "manga": { "id": 1, "source": "mangadex", "title": "One Piece", "author": ["Oda Eiichiro"], "genre": ["Action", "Adventure"], "status": "Ongoing", "description": "...", "path": "/manga/12345", "thumbnail_url": "https://...", "is_favorite": true }, "chapters": [...], "chapter": { "id": 100, "source": "mangadex", "manga_id": 1, "vol": "100", "no": "1050", "title": "The Drums of Liberation", "path": "/chapter/67890", "read": 15, "uploaded": "2023-01-15T10:30:00" }, "pages": [ "/api/page/1001", "/api/page/1002", "/api/page/1003" ] } ``` ``` -------------------------------- ### Register Service Worker in Tanoshi Source: https://github.com/anujsreedharan/tanoshi/blob/master/tanoshi-web/static/index.html Registers the service worker located at /sw.js when the window finishes loading. Requires browser support for service workers. ```javascript window.onload = () => { 'use strict'; if ('serviceWorker' in navigator) { navigator.serviceWorker .register('/sw.js'); } } ``` -------------------------------- ### Manga Information API Source: https://context7.com/anujsreedharan/tanoshi/llms.txt Retrieve detailed information about a specific manga. ```APIDOC ## GET /api/manga/{id} ### Description Get detailed manga information. ### Method GET ### Endpoint /api/manga/{id} ### Parameters #### Path Parameters - **id** (integer) - Required - The ID of the manga to retrieve. #### Query Parameters - **refresh** (boolean) - Optional - If true, forces a refresh of the manga data from the source. ### Request Example ```bash curl -X GET http://localhost:3030/api/manga/1 \ -H "Authorization: " ``` ### Response #### Success Response (200) - **manga** (object) - Contains detailed information about the manga. - **id** (integer) - The unique identifier for the manga. - **source** (string) - The source of the manga data (e.g., "mangadex"). - **title** (string) - The title of the manga. - **author** (array of strings) - The author(s) of the manga. - **genre** (array of strings) - The genre(s) of the manga. - **status** (string) - The current status of the manga (e.g., "Ongoing", "Completed"). - **description** (string) - A brief description of the manga. - **path** (string) - The path to the manga on the source. - **thumbnail_url** (string) - URL for the manga's thumbnail image. - **last_read** (integer or null) - The last read chapter number or null if not read. - **last_page** (integer or null) - The last read page number within the last read chapter or null. - **is_favorite** (boolean) - Indicates if the manga is marked as a favorite. - **status** (string) - The status of the request (e.g., "success"). #### Response Example ```json { "manga": { "id": 1, "source": "mangadex", "title": "One Piece", "author": ["Oda Eiichiro"], "genre": ["Action", "Adventure", "Comedy"], "status": "Ongoing", "description": "Gol D. Roger was known as the Pirate King...", "path": "/manga/12345", "thumbnail_url": "https://...", "last_read": 1050, "last_page": 15, "is_favorite": true }, "status": "success" } ``` ``` -------------------------------- ### Favorites API Source: https://context7.com/anujsreedharan/tanoshi/llms.txt Manage the user's favorite manga list. ```APIDOC ## GET /api/favorites ### Description Get the user's list of favorite manga, with options for sorting. ### Method GET ### Endpoint /api/favorites ### Parameters #### Query Parameters - **sort_by** (string) - Optional - The field to sort favorites by (e.g., "LastUpdated", "Title"). - **sort_order** (string) - Optional - The order of sorting ("Asc" or "Desc"). Defaults to "Asc". ### Request Example ```bash curl -X GET "http://localhost:3030/api/favorites?sort_by=LastUpdated&sort_order=Desc" \ -H "Authorization: " ``` ### Response #### Success Response (200) - **mangas** (array of objects) - A list of the user's favorite manga. - **id** (integer) - The unique identifier for the manga. - **source** (string) - The source of the manga data. - **title** (string) - The title of the manga. - **author** (array of strings) - The author(s) of the manga. - **status** (string) - The current status of the manga. - **description** (string) - A brief description of the manga. - **path** (string) - The path to the manga on the source. - **thumbnail_url** (string) - URL for the manga's thumbnail image. - **is_favorite** (boolean) - Indicates if the manga is marked as a favorite. - **status** (string) - The status of the request (e.g., "success"). #### Response Example ```json { "mangas": [ { "id": 1, "source": "mangadex", "title": "One Piece", "author": ["Oda Eiichiro"], "status": "Ongoing", "description": "...", "path": "/manga/12345", "thumbnail_url": "https://...", "is_favorite": true } ], "status": "success" } ``` ## POST /api/favorites/manga/{id} ### Description Add a manga to the user's favorites list. ### Method POST ### Endpoint /api/favorites/manga/{id} ### Parameters #### Path Parameters - **id** (integer) - Required - The ID of the manga to add to favorites. ### Request Example ```bash curl -X POST http://localhost:3030/api/favorites/manga/1 \ -H "Authorization: " ``` ### Response #### Success Response (200) - **status** (string) - The status of the request (e.g., "success"). #### Response Example ```json {"status": "success"} ``` ## DELETE /api/favorites/manga/{id} ### Description Remove a manga from the user's favorites list. ### Method DELETE ### Endpoint /api/favorites/manga/{id} ### Parameters #### Path Parameters - **id** (integer) - Required - The ID of the manga to remove from favorites. ### Request Example ```bash curl -X DELETE http://localhost:3030/api/favorites/manga/1 \ -H "Authorization: " ``` ### Response #### Success Response (200) - **status** (string) - The status of the request (e.g., "success"). #### Response Example ```json {"status": "success"} ``` ``` -------------------------------- ### Remove Manga from Favorites Source: https://context7.com/anujsreedharan/tanoshi/llms.txt Remove a specific manga from the user's favorites list. Requires an Authorization header. ```bash curl -X DELETE http://localhost:3030/api/favorites/manga/1 \ -H "Authorization: " ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.