{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.Google.Resource.Games.Achievements.Unlock
(
AchievementsUnlockResource
, achievementsUnlock
, AchievementsUnlock
, auBuiltinGameId
, auAchievementId
) where
import Network.Google.Games.Types
import Network.Google.Prelude
type AchievementsUnlockResource =
"games" :>
"v1" :>
"achievements" :>
Capture "achievementId" Text :>
"unlock" :>
QueryParam "builtinGameId" Text :>
QueryParam "alt" AltJSON :>
Post '[JSON] AchievementUnlockResponse
data AchievementsUnlock = AchievementsUnlock'
{ _auBuiltinGameId :: !(Maybe Text)
, _auAchievementId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
achievementsUnlock
:: Text
-> AchievementsUnlock
achievementsUnlock pAuAchievementId_ =
AchievementsUnlock'
{ _auBuiltinGameId = Nothing
, _auAchievementId = pAuAchievementId_
}
auBuiltinGameId :: Lens' AchievementsUnlock (Maybe Text)
auBuiltinGameId
= lens _auBuiltinGameId
(\ s a -> s{_auBuiltinGameId = a})
auAchievementId :: Lens' AchievementsUnlock Text
auAchievementId
= lens _auAchievementId
(\ s a -> s{_auAchievementId = a})
instance GoogleRequest AchievementsUnlock where
type Rs AchievementsUnlock =
AchievementUnlockResponse
type Scopes AchievementsUnlock =
'["https://www.googleapis.com/auth/games"]
requestClient AchievementsUnlock'{..}
= go _auAchievementId _auBuiltinGameId (Just AltJSON)
gamesService
where go
= buildClient
(Proxy :: Proxy AchievementsUnlockResource)
mempty