{-# 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.Blogger.Users.Get
(
UsersGetResource
, usersGet
, UsersGet
, ugUserId
) where
import Network.Google.Blogger.Types
import Network.Google.Prelude
type UsersGetResource =
"blogger" :>
"v3" :>
"users" :>
Capture "userId" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] User
newtype UsersGet = UsersGet'
{ _ugUserId :: Text
} deriving (Eq,Show,Data,Typeable,Generic)
usersGet
:: Text
-> UsersGet
usersGet pUgUserId_ =
UsersGet'
{ _ugUserId = pUgUserId_
}
ugUserId :: Lens' UsersGet Text
ugUserId = lens _ugUserId (\ s a -> s{_ugUserId = a})
instance GoogleRequest UsersGet where
type Rs UsersGet = User
type Scopes UsersGet =
'["https://www.googleapis.com/auth/blogger",
"https://www.googleapis.com/auth/blogger.readonly"]
requestClient UsersGet'{..}
= go _ugUserId (Just AltJSON) bloggerService
where go
= buildClient (Proxy :: Proxy UsersGetResource)
mempty