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
"cn" -> "api.battlenet.com.cn"
_ -> E.encodeUtf8 r <> ".api.battle.net"

View File

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

View File

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