Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module is an interface to the Readability's Shortener API.
To get more info, visit https://www.readability.com/developers/api/shortener.
- data Article = Article {
- content :: Maybe Text
- domain :: Maybe Text
- author :: Maybe Text
- url :: Text
- short_url :: Maybe Text
- title :: Maybe Text
- excerpt :: Maybe Text
- direction :: Maybe Text
- word_count :: Integer
- total_pages :: Maybe Integer
- date_published :: Maybe Text
- dek :: Maybe Text
- lead_image_url :: Maybe Text
- next_page_id :: Maybe Text
- rendered_pages :: Maybe Int
- data ShortenerMeta = ShortenerMeta {}
- data ShortenerResponse = ShortenerResponse {
- se_meta :: ShortenerMeta
- se_messages :: [Text]
- se_success :: Bool
- shortenUrl :: String -> IO (Either String ShortenerResponse)
- retrieveUrl :: String -> IO (Either String ShortenerResponse)
Documentation
Article | |
|
Shorten and retrieve URL
data ShortenerMeta Source
Contains main data
ShortenerMeta | |
|
data ShortenerResponse Source
Response from Shortener API
ShortenerResponse | |
|
shortenUrl :: String -> IO (Either String ShortenerResponse) Source
Create a new shortened URL
This is a POST
request to /urls
.
retrieveUrl :: String -> IO (Either String ShortenerResponse) Source
Retrieve a single shortened URL
This is a GET
request to /urls/{urlId}
.