{-# 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.URLShortener.URL.List
(
URLListResource
, urlList
, URLList
, ulStartToken
, ulProjection
) where
import Network.Google.Prelude
import Network.Google.URLShortener.Types
type URLListResource =
"urlshortener" :>
"v1" :>
"url" :>
"history" :>
QueryParam "start-token" Text :>
QueryParam "projection" URLListProjection :>
QueryParam "alt" AltJSON :> Get '[JSON] URLHistory
data URLList = URLList'
{ _ulStartToken :: !(Maybe Text)
, _ulProjection :: !(Maybe URLListProjection)
} deriving (Eq,Show,Data,Typeable,Generic)
urlList
:: URLList
urlList =
URLList'
{ _ulStartToken = Nothing
, _ulProjection = Nothing
}
ulStartToken :: Lens' URLList (Maybe Text)
ulStartToken
= lens _ulStartToken (\ s a -> s{_ulStartToken = a})
ulProjection :: Lens' URLList (Maybe URLListProjection)
ulProjection
= lens _ulProjection (\ s a -> s{_ulProjection = a})
instance GoogleRequest URLList where
type Rs URLList = URLHistory
type Scopes URLList =
'["https://www.googleapis.com/auth/urlshortener"]
requestClient URLList'{..}
= go _ulStartToken _ulProjection (Just AltJSON)
uRLShortenerService
where go
= buildClient (Proxy :: Proxy URLListResource) mempty