-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | A library and a command line tool to access bit.ly URL shortener.
--
-- This package allows to use bit.ly and j.mp URL shortening service from
-- Haskell. Currently it supports shorten and expand requests.
--
-- API key is required. Please find yours at
-- http://bit.ly/account/.
--
-- An optional command line utility is provided (use `-f buildCLI` to
-- build it).
@package Bitly
@version 0.0.1
-- | This package allows to use bit.ly and j.mp URL
-- shortening service from Haskell programs. See also
-- Network.TinyURL module.
module Network.Bitly
-- | Service credentials.
data Account
Account :: String -> String -> String -> Account
-- | bit.ly login name
login :: Account -> String
-- | API key as found at http://bit.ly/account/
apikey :: Account -> String
-- | Server to use, e.g. http://api.j.mp
server :: Account -> String
-- | Account to use with bit.ly
bitlyAccount :: Account
-- | Account to use with j.mp
jmpAccount :: Account
-- | Given a long URL, shorten encodes it as a shorter one.
shorten :: Account -> String -> IO Result
-- | Given a short bit.ly URL, expand decodes it back into a long
-- source URL.
expand :: Account -> String -> IO Result
-- | Either an error message or a modified URL
type Result = Either String String
instance Read Account
instance Show Account