Bitly-0.0.2: A library and a command line tool to access URL shortener.Source codeContentsIndex
This package allows to use and URL shortening service from Haskell programs. See also Network.TinyURL module.
data Account = Account {
login :: String
apikey :: String
server :: String
bitlyAccount :: Account
jmpAccount :: Account
shorten :: Account -> String -> IO Result
expand :: Account -> String -> IO Result
type Result = Either String String
data Account Source
Service credentials.
login :: login name
apikey :: StringAPI key as found at
server :: StringServer to use, e.g.
show/hide Instances
bitlyAccount :: AccountSource
Account to use with
jmpAccount :: AccountSource
Account to use with
:: AccountAccount to use
-> StringLong URL
-> IO ResultEither error or short URL
Given a long URL, shorten encodes it as a shorter one.
:: AccountAccount to use
-> StringShort URL
-> IO ResultEither error or long source URL
Given a short URL, expand decodes it back into a long source URL.
type Result = Either String StringSource
Either an error message or a modified URL
Produced by Haddock version 2.4.2