{-# 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.Books.MyLibrary.ReadingPositions.Get
(
MyLibraryReadingPositionsGetResource
, myLibraryReadingPositionsGet
, MyLibraryReadingPositionsGet
, mlrpgContentVersion
, mlrpgVolumeId
, mlrpgSource
) where
import Network.Google.Books.Types
import Network.Google.Prelude
type MyLibraryReadingPositionsGetResource =
"books" :>
"v1" :>
"mylibrary" :>
"readingpositions" :>
Capture "volumeId" Text :>
QueryParam "contentVersion" Text :>
QueryParam "source" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON] ReadingPosition
data MyLibraryReadingPositionsGet = MyLibraryReadingPositionsGet'
{ _mlrpgContentVersion :: !(Maybe Text)
, _mlrpgVolumeId :: !Text
, _mlrpgSource :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
myLibraryReadingPositionsGet
:: Text
-> MyLibraryReadingPositionsGet
myLibraryReadingPositionsGet pMlrpgVolumeId_ =
MyLibraryReadingPositionsGet'
{ _mlrpgContentVersion = Nothing
, _mlrpgVolumeId = pMlrpgVolumeId_
, _mlrpgSource = Nothing
}
mlrpgContentVersion :: Lens' MyLibraryReadingPositionsGet (Maybe Text)
mlrpgContentVersion
= lens _mlrpgContentVersion
(\ s a -> s{_mlrpgContentVersion = a})
mlrpgVolumeId :: Lens' MyLibraryReadingPositionsGet Text
mlrpgVolumeId
= lens _mlrpgVolumeId
(\ s a -> s{_mlrpgVolumeId = a})
mlrpgSource :: Lens' MyLibraryReadingPositionsGet (Maybe Text)
mlrpgSource
= lens _mlrpgSource (\ s a -> s{_mlrpgSource = a})
instance GoogleRequest MyLibraryReadingPositionsGet
where
type Rs MyLibraryReadingPositionsGet =
ReadingPosition
type Scopes MyLibraryReadingPositionsGet =
'["https://www.googleapis.com/auth/books"]
requestClient MyLibraryReadingPositionsGet'{..}
= go _mlrpgVolumeId _mlrpgContentVersion _mlrpgSource
(Just AltJSON)
booksService
where go
= buildClient
(Proxy :: Proxy MyLibraryReadingPositionsGetResource)
mempty