hsreadability-1.0.0.0: Access to the Readability API.

Safe HaskellNone
LanguageHaskell2010

Network.Readability.Shortener

Contents

Description

This module is an interface to the Readability's Shortener API.

To get more info, visit https://www.readability.com/developers/api/shortener.

Synopsis

Documentation

data Article Source

Constructors

Article 

Fields

content :: Maybe Text

The main content of the article (in HTML)

domain :: Maybe Text

Domain name of article host

author :: Maybe Text
 
url :: Text

URL of the article

short_url :: Maybe Text

Shortened URL provided by Readability Shortener

title :: Maybe Text
 
excerpt :: Maybe Text
 
direction :: Maybe Text

Text direction of article

word_count :: Integer
 
total_pages :: Maybe Integer

Total number of pages in article

date_published :: Maybe Text
 
dek :: Maybe Text
 
lead_image_url :: Maybe Text
 
next_page_id :: Maybe Text
 
rendered_pages :: Maybe Int
 

Shorten and retrieve URL

data ShortenerMeta Source

Contains main data

Constructors

ShortenerMeta 

Fields

smeta_article :: Maybe Article
 
smeta_url :: Maybe Text
 
smeta_rdd_url :: Text

The shortened URL

smeta_id :: Text

The id of shortened URL

smeta_full_url :: Maybe Text

The Article URL

data ShortenerResponse Source

Response from Shortener API

Constructors

ShortenerResponse 

Fields

se_meta :: ShortenerMeta
 
se_messages :: [Text]

The response messages

se_success :: Bool
 

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}.