info:
  name: Download Book (KEPUB)
  type: http
  seq: 4
http:
  method: GET
  url: '{{opds_base_url}}/devices/{{device_id}}/download/{{book_id}}?format=kepub'

docs: |-
  ## Download Book (KEPUB)
  
    Downloads a book in Kobo-specific KEPUB format, optimized for Kobo e-readers.
  
    **Method:** GET
  
    **Endpoint:** /devices/{device_id}/download/{book_id}
  
    **Authentication:** Required (Device token or Bearer token)
  
    **Path Parameters:**
    - `device_id` (string): Device ID
    - `book_id` (string): Book ID
  
    **Query Parameters:**
    - `format` (string, required): File format (kepub for Kobo devices)
  
    **Response:**
    - Binary KEPUB file content (EPUB with Kobo-specific enhancements)
  
    **Status Codes:**
    - 200: Success (file download)
    - 401: Unauthorized
    - 403: Forbidden (device not authorized for this book)
    - 404: Book not found
