{-# 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.Onboarding.ListCategories
(
OnboardingListCategoriesResource
, onboardingListCategories
, OnboardingListCategories
, olcLocale
) where
import Network.Google.Books.Types
import Network.Google.Prelude
type OnboardingListCategoriesResource =
"books" :>
"v1" :>
"onboarding" :>
"listCategories" :>
QueryParam "locale" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Category
newtype OnboardingListCategories = OnboardingListCategories'
{ _olcLocale :: Maybe Text
} deriving (Eq,Show,Data,Typeable,Generic)
onboardingListCategories
:: OnboardingListCategories
onboardingListCategories =
OnboardingListCategories'
{ _olcLocale = Nothing
}
olcLocale :: Lens' OnboardingListCategories (Maybe Text)
olcLocale
= lens _olcLocale (\ s a -> s{_olcLocale = a})
instance GoogleRequest OnboardingListCategories where
type Rs OnboardingListCategories = Category
type Scopes OnboardingListCategories =
'["https://www.googleapis.com/auth/books"]
requestClient OnboardingListCategories'{..}
= go _olcLocale (Just AltJSON) booksService
where go
= buildClient
(Proxy :: Proxy OnboardingListCategoriesResource)
mempty