scrape-changes-0.1.0.5: Scrape websites for changes

Safe HaskellNone
LanguageHaskell2010

Network.ScrapeChanges.Domain

Synopsis

Documentation

type CronScheduleString = String Source #

String encoded in the standard cron format

type Url = String Source #

Url to scrape

type HttpBody = ByteString Source #

Body of the HTTP request

type Scraper = HttpBody -> Text Source #

Function extracting Text of HttpBody

type Text = Text Source #

Codomain of Scraper

data MailAddr Source #

Mail address for provided MailConfig

Constructors

MailAddr 

Fields

Instances

Eq MailAddr Source # 
Show MailAddr Source # 
Generic MailAddr Source # 

Associated Types

type Rep MailAddr :: * -> * #

Methods

from :: MailAddr -> Rep MailAddr x #

to :: Rep MailAddr x -> MailAddr #

Hashable MailAddr Source # 

Methods

hashWithSalt :: Int -> MailAddr -> Int #

hash :: MailAddr -> Int #

type Rep MailAddr Source # 
type Rep MailAddr = D1 (MetaData "MailAddr" "Network.ScrapeChanges.Domain" "scrape-changes-0.1.0.5-GwZntidl1MYCt8WtjBWLoI" False) (C1 (MetaCons "MailAddr" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_mailAddrName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Text))) (S1 (MetaSel (Just Symbol "_mailAddr") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String))))

data Mail Source #

Instances

Eq Mail Source # 

Methods

(==) :: Mail -> Mail -> Bool #

(/=) :: Mail -> Mail -> Bool #

Show Mail Source # 

Methods

showsPrec :: Int -> Mail -> ShowS #

show :: Mail -> String #

showList :: [Mail] -> ShowS #

Generic Mail Source # 

Associated Types

type Rep Mail :: * -> * #

Methods

from :: Mail -> Rep Mail x #

to :: Rep Mail x -> Mail #

Hashable Mail Source # 

Methods

hashWithSalt :: Int -> Mail -> Int #

hash :: Mail -> Int #

type Rep Mail Source # 

data CallbackConfig Source #

Constructors

MailConfig Mail

Send a mail when there's changed data at your scrape target. This needs sendmail to be configured correctly on the host your program runs.

OtherConfig (Text -> IO ())

Just execute the provided function when there's changed data at your scrape target.

data ScrapeConfig Source #

Constructors

ScrapeConfig 

Fields

data ScrapeResult Source #

Constructors

CallbackCalled

Signals that the last execution of the provided ScrapeConfig led to execution of CallbackConfig

CallbackNotCalled

Signals that the last execution of the provided ScrapeConfig didn't lead to execution of CallbackConfig