{-# 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.PlusDomains.People.Get
(
PeopleGetResource
, peopleGet
, PeopleGet
, pgUserId
) where
import Network.Google.PlusDomains.Types
import Network.Google.Prelude
type PeopleGetResource =
"plusDomains" :>
"v1" :>
"people" :>
Capture "userId" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Person
-- | Get a person\'s profile.
--
-- /See:/ 'peopleGet' smart constructor.
newtype PeopleGet = PeopleGet'
{ _pgUserId :: Text
} deriving (Eq,Show,Data,Typeable,Generic)
-- | Creates a value of 'PeopleGet' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'pgUserId'
peopleGet
:: Text -- ^ 'pgUserId'
-> PeopleGet
peopleGet pPgUserId_ =
PeopleGet'
{ _pgUserId = pPgUserId_
}
-- | The ID of the person to get the profile for. The special value \"me\"
-- can be used to indicate the authenticated user.
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/plus.profiles.read",
"https://www.googleapis.com/auth/userinfo.email",
"https://www.googleapis.com/auth/userinfo.profile"]
requestClient PeopleGet'{..}
= go _pgUserId (Just AltJSON) plusDomainsService
where go
= buildClient (Proxy :: Proxy PeopleGetResource)
mempty