{-# 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.Calendar.CalendarList.Get
(
CalendarListGetResource
, calendarListGet
, CalendarListGet
, clgCalendarId
) where
import Network.Google.AppsCalendar.Types
import Network.Google.Prelude
type CalendarListGetResource =
"calendar" :>
"v3" :>
"users" :>
"me" :>
"calendarList" :>
Capture "calendarId" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON] CalendarListEntry
newtype CalendarListGet = CalendarListGet'
{ _clgCalendarId :: Text
} deriving (Eq,Show,Data,Typeable,Generic)
calendarListGet
:: Text
-> CalendarListGet
calendarListGet pClgCalendarId_ =
CalendarListGet'
{ _clgCalendarId = pClgCalendarId_
}
clgCalendarId :: Lens' CalendarListGet Text
clgCalendarId
= lens _clgCalendarId
(\ s a -> s{_clgCalendarId = a})
instance GoogleRequest CalendarListGet where
type Rs CalendarListGet = CalendarListEntry
type Scopes CalendarListGet =
'["https://www.googleapis.com/auth/calendar",
"https://www.googleapis.com/auth/calendar.readonly"]
requestClient CalendarListGet'{..}
= go _clgCalendarId (Just AltJSON)
appsCalendarService
where go
= buildClient
(Proxy :: Proxy CalendarListGetResource)
mempty