twitter-types 0.7.1.1 → 0.7.2
raw patch · 2 files changed
+14/−11 lines, 2 files
Files
- Web/Twitter/Types.hs +13/−10
- twitter-types.cabal +1/−1
Web/Twitter/Types.hs view
@@ -67,6 +67,7 @@ | SDelete Delete -- | SScrubGeo ScrubGeo | SFriends Friends+ | SDirectMessage DirectMessage | SUnknown Value deriving (Show, Eq, Data, Typeable, Generic) @@ -100,6 +101,7 @@ SEvent <$> js <|> SDelete <$> js <|> SFriends <$> (o .: "friends") <|>+ SDirectMessage <$> (o .: "direct_message") <|> return (SUnknown v) where js :: FromJSON a => Parser a@@ -112,6 +114,7 @@ toJSON (SEvent e) = toJSON e toJSON (SDelete d) = toJSON d toJSON (SFriends f) = toJSON f+ toJSON (SDirectMessage m) = toJSON m toJSON (SUnknown v) = v -- | This type represents a Twitter tweet structure.@@ -150,8 +153,8 @@ instance FromJSON Status where parseJSON (Object o) = checkError o >>- Status <$> o .:? "contributors"- <*> o .:? "coordinates"+ Status <$> o .:? "contributors" .!= Nothing+ <*> o .:? "coordinates" .!= Nothing <*> (o .: "created_at" >>= return . fromTwitterTime) <*> ((o .: "current_user_retweet" >>= (.: "id")) <|> return Nothing) <*> o .:? "entities"@@ -160,11 +163,11 @@ <*> o .:? "favorited" <*> o .:? "filter_level" <*> o .: "id"- <*> o .:? "in_reply_to_screen_name"- <*> o .:? "in_reply_to_status_id"- <*> o .:? "in_reply_to_user_id"+ <*> o .:? "in_reply_to_screen_name" .!= Nothing+ <*> o .:? "in_reply_to_status_id" .!= Nothing+ <*> o .:? "in_reply_to_user_id" .!= Nothing <*> o .:? "lang"- <*> o .:? "place"+ <*> o .:? "place" .!= Nothing <*> o .:? "possibly_sensitive" <*> o .:? "scopes" <*> o .:? "quoted_status_id"@@ -501,8 +504,8 @@ <*> o .: "default_profile_image" <*> o .:? "description" <*> o .: "favourites_count"- <*> o .:? "follow_request_sent"- <*> o .:? "following"+ <*> o .:? "follow_request_sent" .!= Nothing+ <*> o .:? "following" .!= Nothing <*> o .: "followers_count" <*> o .: "friends_count" <*> o .: "geo_enabled"@@ -512,7 +515,7 @@ <*> o .: "listed_count" <*> o .:? "location" <*> o .: "name"- <*> o .:? "notifications"+ <*> o .:? "notifications" .!= Nothing <*> o .:? "profile_background_color" <*> o .:? "profile_background_image_url" <*> o .:? "profile_background_image_url_https"@@ -530,7 +533,7 @@ <*> o .:? "show_all_inline_media" <*> o .: "statuses_count" <*> o .:? "time_zone"- <*> o .:? "url"+ <*> o .:? "url" .!= Nothing <*> o .:? "utc_offset" <*> o .: "verified" <*> o .:? "withheld_in_countries"
twitter-types.cabal view
@@ -1,5 +1,5 @@ name: twitter-types-version: 0.7.1.1+version: 0.7.2 license: BSD3 license-file: LICENSE author: Takahiro HIMURA