Skip to content

Latest commit

 

History

History
38 lines (26 loc) · 1.16 KB

REST.md

File metadata and controls

38 lines (26 loc) · 1.16 KB

url2epub REST APIs

This documentation describes how REST APIs on https://url2epub.fishy.me/ work. For the Telegram bot, just talk to the bot from Telegram.

Overview

Unless specified otherwise by the endpoint, all endpoints:

  1. Take both GET or POST requests
    • For POST requests, you need to use form instead of JSON.
  2. Upon error, the response will be in plain text.
  3. Upon success, the response will be in JSON.

Endpoints

/epub

Generate an epub file from the given URL.

Args

Arg Type Description
url string The URL of the article.
gray bool Whether to grayscale all images.
fit int Downscale images to fit in fit x fit if needed, only used when gray is set to true.
passthrough-user-agent bool Use the same User-Agent from the original request.

Response

The response will be the epub file, with proper Content-Disposition, Content-Type headers set. Note that this is not JSON.