xpElem,
xpInt,
xpList,
+ xpOption,
xpPrim,
xpText,
- xpText0,
xpWrap )
import TSN.Picklers( xp_date, xp_team_id )
name :: String,
injury :: String,
status :: String,
- fantasy :: String, -- ^ Nobody knows what this is.
+ fantasy :: Maybe String, -- ^ Nobody knows what this is.
injured :: Bool,
injury_type :: String -- ^ "type" is a reserved keyword so we can't use it
}
(xpElem "Name" xpText)
(xpElem "Injury" xpText)
(xpElem "Status" xpText)
- (xpElem "Fantasy" xpText0)
+ (xpElem "Fantasy" $ xpOption xpText)
(xpElem "Injured" xpPrim)
(xpElem "Type" xpText)
where
xpOption,
xpPair,
xpText,
- xpText0,
xpTriple,
xpWrap )
xml_mid :: MsgId,
xml_category :: String,
xml_sport :: String,
- xml_url :: String,
+ xml_url :: Maybe String,
xml_teams :: [NewsTeam],
xml_locations :: [NewsLocation],
xml_sms :: String,
News {
db_mid :: MsgId,
db_sport :: String,
- db_url :: String,
+ db_url :: Maybe String,
db_sms :: String,
db_editor :: Maybe String,
db_text :: Maybe String,
pickle_msg_id
(xpElem "category" xpText)
(xpElem "sport" xpText)
- (xpElem "url" xpText0)
+ (xpElem "url" $ xpOption xpText)
(xpList pickle_news_team)
(xpList pickle_location)
(xpElem "SMS" xpText)