{-# 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.Series.Get
(
SeriesGetResource
, seriesGet
, SeriesGet
, sgSeriesId
) where
import Network.Google.Books.Types
import Network.Google.Prelude
type SeriesGetResource =
"books" :>
"v1" :>
"series" :>
"get" :>
QueryParams "series_id" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Series
newtype SeriesGet = SeriesGet'
{ _sgSeriesId :: [Text]
} deriving (Eq,Show,Data,Typeable,Generic)
seriesGet
:: [Text]
-> SeriesGet
seriesGet pSgSeriesId_ =
SeriesGet'
{ _sgSeriesId = _Coerce # pSgSeriesId_
}
sgSeriesId :: Lens' SeriesGet [Text]
sgSeriesId
= lens _sgSeriesId (\ s a -> s{_sgSeriesId = a}) .
_Coerce
instance GoogleRequest SeriesGet where
type Rs SeriesGet = Series
type Scopes SeriesGet =
'["https://www.googleapis.com/auth/books"]
requestClient SeriesGet'{..}
= go _sgSeriesId (Just AltJSON) booksService
where go
= buildClient (Proxy :: Proxy SeriesGetResource)
mempty