{-# 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.Rate
(
VolumesRecommendedRateResource
, volumesRecommendedRate
, VolumesRecommendedRate
, vrrRating
, vrrLocale
, vrrVolumeId
, vrrSource
) where
import Network.Google.Books.Types
import Network.Google.Prelude
type VolumesRecommendedRateResource =
"books" :>
"v1" :>
"volumes" :>
"recommended" :>
"rate" :>
QueryParam "rating" VolumesRecommendedRateRating :>
QueryParam "volumeId" Text :>
QueryParam "locale" Text :>
QueryParam "source" Text :>
QueryParam "alt" AltJSON :>
Post '[JSON] BooksVolumesRecommendedRateResponse
data VolumesRecommendedRate = VolumesRecommendedRate'
{ _vrrRating :: !VolumesRecommendedRateRating
, _vrrLocale :: !(Maybe Text)
, _vrrVolumeId :: !Text
, _vrrSource :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
volumesRecommendedRate
:: VolumesRecommendedRateRating
-> Text
-> VolumesRecommendedRate
volumesRecommendedRate pVrrRating_ pVrrVolumeId_ =
VolumesRecommendedRate'
{ _vrrRating = pVrrRating_
, _vrrLocale = Nothing
, _vrrVolumeId = pVrrVolumeId_
, _vrrSource = Nothing
}
vrrRating :: Lens' VolumesRecommendedRate VolumesRecommendedRateRating
vrrRating
= lens _vrrRating (\ s a -> s{_vrrRating = a})
vrrLocale :: Lens' VolumesRecommendedRate (Maybe Text)
vrrLocale
= lens _vrrLocale (\ s a -> s{_vrrLocale = a})
vrrVolumeId :: Lens' VolumesRecommendedRate Text
vrrVolumeId
= lens _vrrVolumeId (\ s a -> s{_vrrVolumeId = a})
vrrSource :: Lens' VolumesRecommendedRate (Maybe Text)
vrrSource
= lens _vrrSource (\ s a -> s{_vrrSource = a})
instance GoogleRequest VolumesRecommendedRate where
type Rs VolumesRecommendedRate =
BooksVolumesRecommendedRateResponse
type Scopes VolumesRecommendedRate =
'["https://www.googleapis.com/auth/books"]
requestClient VolumesRecommendedRate'{..}
= go (Just _vrrRating) (Just _vrrVolumeId) _vrrLocale
_vrrSource
(Just AltJSON)
booksService
where go
= buildClient
(Proxy :: Proxy VolumesRecommendedRateResource)
mempty