This commit is contained in:
Sid Raval 2017-07-19 19:25:48 -04:00 committed by Sid Raval
parent bed6d04384
commit c416ab90d2
3 changed files with 6 additions and 8 deletions

View File

@ -78,5 +78,3 @@ makeCredentials region manager token = do
case r of case r of
"cn" -> "api.battlenet.com.cn" "cn" -> "api.battlenet.com.cn"
_ -> E.encodeUtf8 r <> ".api.battle.net" _ -> E.encodeUtf8 r <> ".api.battle.net"

View File

@ -50,7 +50,7 @@ instance FromJSON BitbucketUser where
parseJSON _ = mzero parseJSON _ = mzero
data BitbucketUserLinks = BitbucketUserLinks newtype BitbucketUserLinks = BitbucketUserLinks
{ bitbucketAvatarLink :: BitbucketLink { bitbucketAvatarLink :: BitbucketLink
} }
@ -60,24 +60,24 @@ instance FromJSON BitbucketUserLinks where
parseJSON _ = mzero parseJSON _ = mzero
data BitbucketLink = BitbucketLink newtype BitbucketLink = BitbucketLink
{ bitbucketLinkHref :: Text { bitbucketLinkHref :: Text
} }
instance FromJSON BitbucketLink where instance FromJSON BitbucketLink where
parseJSON (Object o) = BitbucketLink parseJSON (Object o) = BitbucketLink
<$> o .: "href" <$> o .: "href"
parseJSON _ = mzero parseJSON _ = mzero
data BitbucketEmailSearchResults = BitbucketEmailSearchResults newtype BitbucketEmailSearchResults = BitbucketEmailSearchResults
{ bitbucketEmails :: [BitbucketUserEmail] { bitbucketEmails :: [BitbucketUserEmail]
} }
instance FromJSON BitbucketEmailSearchResults where instance FromJSON BitbucketEmailSearchResults where
parseJSON (Object o) = BitbucketEmailSearchResults parseJSON (Object o) = BitbucketEmailSearchResults
<$> o .: "values" <$> o .: "values"
parseJSON _ = mzero parseJSON _ = mzero
data BitbucketUserEmail = BitbucketUserEmail data BitbucketUserEmail = BitbucketUserEmail

View File

@ -41,7 +41,7 @@ instance FromJSON UpcaseUser where
parseJSON _ = mzero parseJSON _ = mzero
data UpcaseResponse = UpcaseResponse UpcaseUser newtype UpcaseResponse = UpcaseResponse UpcaseUser
instance FromJSON UpcaseResponse where instance FromJSON UpcaseResponse where
parseJSON (Object o) = UpcaseResponse parseJSON (Object o) = UpcaseResponse