{-# 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.Plus.People.Get
(
PeopleGetResource
, peopleGet
, PeopleGet
, pgUserId
) where
import Network.Google.Plus.Types
import Network.Google.Prelude
type PeopleGetResource =
"plus" :>
"v1" :>
"people" :>
Capture "userId" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Person
newtype PeopleGet = PeopleGet'
{ _pgUserId :: Text
} deriving (Eq,Show,Data,Typeable,Generic)
peopleGet
:: Text
-> PeopleGet
peopleGet pPgUserId_ =
PeopleGet'
{ _pgUserId = pPgUserId_
}
pgUserId :: Lens' PeopleGet Text
pgUserId = lens _pgUserId (\ s a -> s{_pgUserId = a})
instance GoogleRequest PeopleGet where
type Rs PeopleGet = Person
type Scopes PeopleGet =
'["https://www.googleapis.com/auth/plus.login",
"https://www.googleapis.com/auth/plus.me",
"https://www.googleapis.com/auth/userinfo.email",
"https://www.googleapis.com/auth/userinfo.profile"]
requestClient PeopleGet'{..}
= go _pgUserId (Just AltJSON) plusService
where go
= buildClient (Proxy :: Proxy PeopleGetResource)
mempty