module Web.Twitter.Types where type ColorString = String type DateString = String type UserId = String type URLString = String type UserName = String data Format = FormatXML | FormatJSON | FormatRSS | FormatAtom data Status = Status { statusCreated :: DateString , statusId :: String , statusText :: String , statusSource :: String , statusTruncated :: Bool , statusInReplyTo :: Maybe String , statusInReplyToUser :: Maybe UserId , statusFavorite :: Maybe Bool , statusUser :: User } nullStatus :: Status nullStatus = Status { statusCreated = "" , statusId = "" , statusText = "" , statusSource = "" , statusTruncated = False , statusInReplyTo = Nothing , statusInReplyToUser = Nothing , statusFavorite = Nothing , statusUser = nullUser } data User = User { userId :: UserId , userName :: UserName , userScreenName :: String , userDescription :: String , userLocation :: String , userProfileImageURL :: Maybe URLString , userURL :: Maybe URLString , userProtected :: Maybe Bool , userFollowers :: Maybe Int } nullUser :: User nullUser = User { userId = "" , userName = "" , userScreenName = "" , userDescription = "" , userLocation = "" , userProfileImageURL = Nothing , userURL = Nothing , userProtected = Nothing , userFollowers = Nothing } data UserInfo = UserInfo { userInfoBackgroundTile :: Bool , userInfoLinkColor :: ColorString , userInfoBackground :: ColorString , userInfoBackgroundImageURL :: URLString , userInfoTextColor :: ColorString , userInfoSidebarFill :: ColorString , userInfoSidebarColor :: ColorString , userInfoFollowers :: Int , userInfoDescription :: String , userInfoUTCOffset :: Int , userInfoFavorites :: Int , userInfoCreated :: DateString , userInfoTimezone :: String , userInfoImageURL :: URLString , userInfoURL :: Maybe URLString , userInfoStatusCount :: Int , userInfoFriends :: Int , userInfoScreenName :: UserName , userInfoProtected :: Bool , userInfoLocation :: String , userInfoName :: UserName , userInfoId :: UserId } nullUserInfo :: UserInfo nullUserInfo = UserInfo { userInfoBackgroundTile = False , userInfoLinkColor = "" , userInfoBackground = "" , userInfoBackgroundImageURL = "" , userInfoTextColor = "" , userInfoSidebarFill = "" , userInfoSidebarColor = "" , userInfoFollowers = 0 , userInfoDescription = "" , userInfoUTCOffset = 0 , userInfoFavorites = 0 , userInfoCreated = "" , userInfoTimezone = "" , userInfoImageURL = "" , userInfoURL = Nothing , userInfoStatusCount = 0 , userInfoFriends = 0 , userInfoScreenName = "" , userInfoProtected = False , userInfoLocation = "" , userInfoName = "" , userInfoId = "" } data DirectMessage = DirectMessage { directRecipient :: Maybe User , directSender :: Maybe User , directSenderId :: UserId , directSenderName :: UserName , directRecipientId :: UserId , directRecipientName :: UserId , directText :: String , directId :: UserId -- mis-named, but works. , directCreated :: DateString } nullDirectMessage :: DirectMessage nullDirectMessage = DirectMessage { directRecipient = Nothing , directSender = Nothing , directSenderId = "" , directSenderName = "" , directRecipientId = "" , directRecipientName = "" , directText = "" , directId = "" , directCreated = "" } data RateLimit = RateLimit { rateLimitResetSecs :: Integer , rateLimitResetTime :: DateString , rateLimitRemHits :: Integer , rateLimitHourlyLimit :: Integer } nullRateLimit :: RateLimit nullRateLimit = RateLimit { rateLimitResetSecs = 0 , rateLimitResetTime = "" , rateLimitRemHits = 0 , rateLimitHourlyLimit = 0 }