### Book Cover Image API Source: https://docs.google.com/document/d/1b2iw31p5Izs0cHyDmErETQSp4KppBVm05BBCkiw67kI/edit_tab=t.0 Retrieve thumbnail images of book covers. ```APIDOC ## GET /file/cover ### Description Retrieves thumbnail images of book covers. ### Method GET ### Endpoint /file/cover ### Query Parameters (No specific query parameters mentioned in the provided text for this endpoint, but typically would include an identifier for the book.) ### Response #### Success Response (200) - Image data (binary) #### Response Example (Binary image data) ``` ```APIDOC ## GET /api/cover ### Description Retrieves thumbnail images of book covers. ### Method GET ### Endpoint /api/cover ### Query Parameters (No specific query parameters mentioned in the provided text for this endpoint, but typically would include an identifier for the book.) ### Response #### Success Response (200) - Image data (binary) #### Response Example (Binary image data) ``` -------------------------------- ### Table of Contents Image API Source: https://docs.google.com/document/d/1b2iw31p5Izs0cHyDmErETQSp4KppBVm05BBCkiw67kI/edit_tab=t.0 Retrieve thumbnail images of book table of contents. ```APIDOC ## GET /file/toc ### Description Retrieves thumbnail images of book table of contents. ### Method GET ### Endpoint /file/toc ### Query Parameters (No specific query parameters mentioned in the provided text for this endpoint, but typically would include an identifier for the book.) ### Response #### Success Response (200) - Image data (binary) #### Response Example (Binary image data) ``` ```APIDOC ## GET /api/toc ### Description Retrieves thumbnail images of book table of contents. ### Method GET ### Endpoint /api/toc ### Query Parameters (No specific query parameters mentioned in the provided text for this endpoint, but typically would include an identifier for the book.) ### Response #### Success Response (200) - Image data (binary) #### Response Example (Binary image data) ``` -------------------------------- ### Library Information API Source: https://docs.google.com/document/d/1b2iw31p5Izs0cHyDmErETQSp4KppBVm05BBCkiw67kI/edit_tab=t.0 Endpoints for retrieving information about libraries and their logos. ```APIDOC ## GET /api/libraries ### Description Retrieves information about participating libraries, including their names and logos. ### Method GET ### Endpoint /api/libraries ### Query Parameters (No specific query parameters mentioned, but could potentially filter by location or other criteria.) ### Response #### Success Response (200) - A list of library objects, each containing name and logo URL. #### Response Example ```json { "libraries": [ { "name": "National Library", "logo": "http://example.com/national_library_logo.png" }, { "name": "City Library", "logo": "http://example.com/city_library_logo.png" } ] } ``` ``` -------------------------------- ### Metadata Retrieval API Source: https://docs.google.com/document/d/1b2iw31p5Izs0cHyDmErETQSp4KppBVm05BBCkiw67kI/edit_tab=t.0 Retrieve metadata for digital objects. Supports simplified responses and suppression of OCR text. ```APIDOC ## GET /api/metadata ### Description Retrieves metadata for digital objects. Supports simplified responses with `simple=1` and suppression of OCR text with `noocr=1`. ### Method GET ### Endpoint /api/metadata ### Query Parameters - **simple** (integer) - Optional - If set to 1, the API response is simplified to the URLs necessary for displaying the catalog page. - **noocr** (integer) - Optional - If set to 1, the API response will not include the `toc_full_text` item (OCR text of the content). - **uuid** (string) - Optional - Identifier for querying metadata (Kramerius system). - **isbn** (string or array of strings) - Optional - Identifier for querying metadata. Can be a single value or an array of values. ### Request Example ``` GET /api/metadata?simple=1&noocr=1 ``` ### Response #### Success Response (200) - **dig_obj** (object) - Contains details of the digital object. - **library** (string) - Textual name of the digital library. - **logo** (string) - URL of the digital library institution's logo. - **toc_full_text** (string) - OCR text of the content (if `noocr` is not set to 1). #### Response Example ```json { "dig_obj": { "library": "National Library", "logo": "http://example.com/logo.png", "toc_full_text": "...OCR text..." } } ``` ``` -------------------------------- ### Comments and Ratings API Source: https://docs.google.com/document/d/1b2iw31p5Izs0cHyDmErETQSp4KppBVm05BBCkiw67kI/edit_tab=t.0 Endpoints for managing comments and ratings for works. ```APIDOC ## GET /api/comments ### Description Retrieves comments and ratings for a specific work. ### Method GET ### Endpoint /api/comments ### Query Parameters (Parameters for specifying the work ID would be expected here.) ### Response #### Success Response (200) - A list of comments and ratings. #### Response Example ```json { "comments": [ { "user": "user123", "rating": 5, "comment": "Great book!" } ] } ``` ``` ```APIDOC ## POST /api/comments ### Description Submits a new comment and rating for a work. ### Method POST ### Endpoint /api/comments ### Request Body - **work_id** (string) - Required - The identifier of the work. - **rating** (integer) - Required - The rating value (e.g., 1-5). - **comment** (string) - Optional - The user's comment. ### Request Example ```json { "work_id": "book123", "rating": 4, "comment": "Enjoyed reading it." } ``` ### Response #### Success Response (200) - Confirmation of successful submission. #### Response Example ```json { "status": "success", "message": "Comment and rating submitted successfully." } ``` ``` ```APIDOC ## PUT /api/comments/{comment_id} ### Description Edits an existing comment and rating. ### Method PUT ### Endpoint /api/comments/{comment_id} ### Path Parameters - **comment_id** (string) - Required - The ID of the comment to edit. ### Request Body - **rating** (integer) - Optional - The updated rating value. - **comment** (string) - Optional - The updated comment text. ### Request Example ```json { "rating": 5, "comment": "Updated my review." } ``` ### Response #### Success Response (200) - Confirmation of successful update. #### Response Example ```json { "status": "success", "message": "Comment and rating updated successfully." } ``` ``` ```APIDOC ## DELETE /api/comments/{comment_id} ### Description Deletes an entire comment and rating record. ### Method DELETE ### Endpoint /api/comments/{comment_id} ### Path Parameters - **comment_id** (string) - Required - The ID of the comment to delete. ### Response #### Success Response (200) - Confirmation of successful deletion. #### Response Example ```json { "status": "success", "message": "Comment and rating deleted successfully." } ``` ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.