{-# 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.Volumes.Recommended.List
(
VolumesRecommendedListResource
, volumesRecommendedList
, VolumesRecommendedList
, vrlLocale
, vrlMaxAllowedMaturityRating
, vrlSource
) where
import Network.Google.Books.Types
import Network.Google.Prelude
type VolumesRecommendedListResource =
"books" :>
"v1" :>
"volumes" :>
"recommended" :>
QueryParam "locale" Text :>
QueryParam "maxAllowedMaturityRating"
VolumesRecommendedListMaxAllowedMaturityRating
:>
QueryParam "source" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Volumes
data VolumesRecommendedList = VolumesRecommendedList'
{ _vrlLocale :: !(Maybe Text)
, _vrlMaxAllowedMaturityRating :: !(Maybe VolumesRecommendedListMaxAllowedMaturityRating)
, _vrlSource :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
volumesRecommendedList
:: VolumesRecommendedList
volumesRecommendedList =
VolumesRecommendedList'
{ _vrlLocale = Nothing
, _vrlMaxAllowedMaturityRating = Nothing
, _vrlSource = Nothing
}
vrlLocale :: Lens' VolumesRecommendedList (Maybe Text)
vrlLocale
= lens _vrlLocale (\ s a -> s{_vrlLocale = a})
vrlMaxAllowedMaturityRating :: Lens' VolumesRecommendedList (Maybe VolumesRecommendedListMaxAllowedMaturityRating)
vrlMaxAllowedMaturityRating
= lens _vrlMaxAllowedMaturityRating
(\ s a -> s{_vrlMaxAllowedMaturityRating = a})
vrlSource :: Lens' VolumesRecommendedList (Maybe Text)
vrlSource
= lens _vrlSource (\ s a -> s{_vrlSource = a})
instance GoogleRequest VolumesRecommendedList where
type Rs VolumesRecommendedList = Volumes
type Scopes VolumesRecommendedList =
'["https://www.googleapis.com/auth/books"]
requestClient VolumesRecommendedList'{..}
= go _vrlLocale _vrlMaxAllowedMaturityRating
_vrlSource
(Just AltJSON)
booksService
where go
= buildClient
(Proxy :: Proxy VolumesRecommendedListResource)
mempty