gogol-urlshortener-0.2.0: Google URL Shortener SDK.

Copyright(c) 2015-2016 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.Google.URLShortener.Types

Contents

Description

 

Synopsis

Service Configuration

uRLShortenerService :: ServiceConfig Source #

Default request referring to version v1 of the URL Shortener API. This contains the host and root path used as a starting point for constructing service requests.

OAuth Scopes

urlShortenerScope :: Proxy '["https://www.googleapis.com/auth/urlshortener"] Source #

Manage your goo.gl short URLs

URL

data URL Source #

Instances

Eq URL Source # 

Methods

(==) :: URL -> URL -> Bool #

(/=) :: URL -> URL -> Bool #

Data URL Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> URL -> c URL #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c URL #

toConstr :: URL -> Constr #

dataTypeOf :: URL -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c URL) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c URL) #

gmapT :: (forall b. Data b => b -> b) -> URL -> URL #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> URL -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> URL -> r #

gmapQ :: (forall d. Data d => d -> u) -> URL -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> URL -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> URL -> m URL #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> URL -> m URL #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> URL -> m URL #

Show URL Source # 

Methods

showsPrec :: Int -> URL -> ShowS #

show :: URL -> String #

showList :: [URL] -> ShowS #

Generic URL Source # 

Associated Types

type Rep URL :: * -> * #

Methods

from :: URL -> Rep URL x #

to :: Rep URL x -> URL #

ToJSON URL Source # 
FromJSON URL Source # 
type Rep URL Source # 

url :: URL Source #

Creates a value of URL with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

uStatus :: Lens' URL (Maybe Text) Source #

Status of the target URL. Possible values: "OK", "MALWARE", "PHISHING", or "REMOVED". A URL might be marked "REMOVED" if it was flagged as spam, for example.

uKind :: Lens' URL Text Source #

The fixed string "urlshortener#url".

uCreated :: Lens' URL (Maybe Text) Source #

Time the short URL was created; ISO 8601 representation using the yyyy-MM-dd'T'HH:mm:ss.SSSZZ format, e.g. "2010-10-14T19:01:24.944+00:00".

uAnalytics :: Lens' URL (Maybe AnalyticsSummary) Source #

A summary of the click analytics for the short and long URL. Might not be present if not requested or currently unavailable.

uLongURL :: Lens' URL (Maybe Text) Source #

Long URL, e.g. "http://www.google.com/". Might not be present if the status is "REMOVED".

uId :: Lens' URL (Maybe Text) Source #

Short URL, e.g. "http://goo.gl/l6MS".

StringCount

data StringCount Source #

Instances

Eq StringCount Source # 
Data StringCount Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> StringCount -> c StringCount #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c StringCount #

toConstr :: StringCount -> Constr #

dataTypeOf :: StringCount -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c StringCount) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c StringCount) #

gmapT :: (forall b. Data b => b -> b) -> StringCount -> StringCount #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> StringCount -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> StringCount -> r #

gmapQ :: (forall d. Data d => d -> u) -> StringCount -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> StringCount -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> StringCount -> m StringCount #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> StringCount -> m StringCount #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> StringCount -> m StringCount #

Show StringCount Source # 
Generic StringCount Source # 

Associated Types

type Rep StringCount :: * -> * #

ToJSON StringCount Source # 
FromJSON StringCount Source # 
type Rep StringCount Source # 
type Rep StringCount = D1 (MetaData "StringCount" "Network.Google.URLShortener.Types.Product" "gogol-urlshortener-0.2.0-CfaHQDL5yUoLS52P0Ax06J" False) (C1 (MetaCons "StringCount'" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_scCount") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Textual Int64)))) (S1 (MetaSel (Just Symbol "_scId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)))))

stringCount :: StringCount Source #

Creates a value of StringCount with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

scCount :: Lens' StringCount (Maybe Int64) Source #

Number of clicks for this top entry, e.g. for this particular country or browser.

scId :: Lens' StringCount (Maybe Text) Source #

Label assigned to this top entry, e.g. "US" or "Chrome".

URLListProjection

data URLListProjection Source #

Additional information to return.

Constructors

AnalyticsClicks

ANALYTICS_CLICKS Returns short URL click counts.

Full

FULL Returns short URL click counts.

Instances

Enum URLListProjection Source # 
Eq URLListProjection Source # 
Data URLListProjection Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> URLListProjection -> c URLListProjection #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c URLListProjection #

toConstr :: URLListProjection -> Constr #

dataTypeOf :: URLListProjection -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c URLListProjection) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c URLListProjection) #

gmapT :: (forall b. Data b => b -> b) -> URLListProjection -> URLListProjection #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> URLListProjection -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> URLListProjection -> r #

gmapQ :: (forall d. Data d => d -> u) -> URLListProjection -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> URLListProjection -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> URLListProjection -> m URLListProjection #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> URLListProjection -> m URLListProjection #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> URLListProjection -> m URLListProjection #

Ord URLListProjection Source # 
Read URLListProjection Source # 
Show URLListProjection Source # 
Generic URLListProjection Source # 
Hashable URLListProjection Source # 
ToJSON URLListProjection Source # 
FromJSON URLListProjection Source # 
FromHttpApiData URLListProjection Source # 
ToHttpApiData URLListProjection Source # 
type Rep URLListProjection Source # 
type Rep URLListProjection = D1 (MetaData "URLListProjection" "Network.Google.URLShortener.Types.Sum" "gogol-urlshortener-0.2.0-CfaHQDL5yUoLS52P0Ax06J" False) ((:+:) (C1 (MetaCons "AnalyticsClicks" PrefixI False) U1) (C1 (MetaCons "Full" PrefixI False) U1))

AnalyticsSnapshot

data AnalyticsSnapshot Source #

Instances

Eq AnalyticsSnapshot Source # 
Data AnalyticsSnapshot Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AnalyticsSnapshot -> c AnalyticsSnapshot #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c AnalyticsSnapshot #

toConstr :: AnalyticsSnapshot -> Constr #

dataTypeOf :: AnalyticsSnapshot -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c AnalyticsSnapshot) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AnalyticsSnapshot) #

gmapT :: (forall b. Data b => b -> b) -> AnalyticsSnapshot -> AnalyticsSnapshot #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AnalyticsSnapshot -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AnalyticsSnapshot -> r #

gmapQ :: (forall d. Data d => d -> u) -> AnalyticsSnapshot -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> AnalyticsSnapshot -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> AnalyticsSnapshot -> m AnalyticsSnapshot #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AnalyticsSnapshot -> m AnalyticsSnapshot #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AnalyticsSnapshot -> m AnalyticsSnapshot #

Show AnalyticsSnapshot Source # 
Generic AnalyticsSnapshot Source # 
ToJSON AnalyticsSnapshot Source # 
FromJSON AnalyticsSnapshot Source # 
type Rep AnalyticsSnapshot Source # 
type Rep AnalyticsSnapshot = D1 (MetaData "AnalyticsSnapshot" "Network.Google.URLShortener.Types.Product" "gogol-urlshortener-0.2.0-CfaHQDL5yUoLS52P0Ax06J" False) (C1 (MetaCons "AnalyticsSnapshot'" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_asPlatforms") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe [StringCount]))) ((:*:) (S1 (MetaSel (Just Symbol "_asShortURLClicks") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Textual Int64)))) (S1 (MetaSel (Just Symbol "_asReferrers") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe [StringCount]))))) ((:*:) (S1 (MetaSel (Just Symbol "_asCountries") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe [StringCount]))) ((:*:) (S1 (MetaSel (Just Symbol "_asLongURLClicks") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Textual Int64)))) (S1 (MetaSel (Just Symbol "_asBrowsers") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe [StringCount])))))))

analyticsSnapshot :: AnalyticsSnapshot Source #

Creates a value of AnalyticsSnapshot with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

asPlatforms :: Lens' AnalyticsSnapshot [StringCount] Source #

Top platforms or OSes, e.g. "Windows"; sorted by (descending) click counts. Only present if this data is available.

asShortURLClicks :: Lens' AnalyticsSnapshot (Maybe Int64) Source #

Number of clicks on this short URL.

asReferrers :: Lens' AnalyticsSnapshot [StringCount] Source #

Top referring hosts, e.g. "www.google.com"; sorted by (descending) click counts. Only present if this data is available.

asCountries :: Lens' AnalyticsSnapshot [StringCount] Source #

Top countries (expressed as country codes), e.g. "US" or "DE"; sorted by (descending) click counts. Only present if this data is available.

asLongURLClicks :: Lens' AnalyticsSnapshot (Maybe Int64) Source #

Number of clicks on all goo.gl short URLs pointing to this long URL.

asBrowsers :: Lens' AnalyticsSnapshot [StringCount] Source #

Top browsers, e.g. "Chrome"; sorted by (descending) click counts. Only present if this data is available.

AnalyticsSummary

data AnalyticsSummary Source #

Instances

Eq AnalyticsSummary Source # 
Data AnalyticsSummary Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AnalyticsSummary -> c AnalyticsSummary #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c AnalyticsSummary #

toConstr :: AnalyticsSummary -> Constr #

dataTypeOf :: AnalyticsSummary -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c AnalyticsSummary) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AnalyticsSummary) #

gmapT :: (forall b. Data b => b -> b) -> AnalyticsSummary -> AnalyticsSummary #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AnalyticsSummary -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AnalyticsSummary -> r #

gmapQ :: (forall d. Data d => d -> u) -> AnalyticsSummary -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> AnalyticsSummary -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> AnalyticsSummary -> m AnalyticsSummary #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AnalyticsSummary -> m AnalyticsSummary #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AnalyticsSummary -> m AnalyticsSummary #

Show AnalyticsSummary Source # 
Generic AnalyticsSummary Source # 
ToJSON AnalyticsSummary Source # 
FromJSON AnalyticsSummary Source # 
type Rep AnalyticsSummary Source # 

analyticsSummary :: AnalyticsSummary Source #

Creates a value of AnalyticsSummary with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

asWeek :: Lens' AnalyticsSummary (Maybe AnalyticsSnapshot) Source #

Click analytics over the last week.

asAllTime :: Lens' AnalyticsSummary (Maybe AnalyticsSnapshot) Source #

Click analytics over all time.

asDay :: Lens' AnalyticsSummary (Maybe AnalyticsSnapshot) Source #

Click analytics over the last day.

asTwoHours :: Lens' AnalyticsSummary (Maybe AnalyticsSnapshot) Source #

Click analytics over the last two hours.

asMonth :: Lens' AnalyticsSummary (Maybe AnalyticsSnapshot) Source #

Click analytics over the last month.

URLGetProjection

data URLGetProjection Source #

Additional information to return.

Constructors

UGPAnalyticsClicks

ANALYTICS_CLICKS Returns only click counts.

UGPAnalyticsTopStrings

ANALYTICS_TOP_STRINGS Returns only top string counts.

UGPFull

FULL Returns the creation timestamp and all available analytics.

Instances

Enum URLGetProjection Source # 
Eq URLGetProjection Source # 
Data URLGetProjection Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> URLGetProjection -> c URLGetProjection #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c URLGetProjection #

toConstr :: URLGetProjection -> Constr #

dataTypeOf :: URLGetProjection -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c URLGetProjection) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c URLGetProjection) #

gmapT :: (forall b. Data b => b -> b) -> URLGetProjection -> URLGetProjection #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> URLGetProjection -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> URLGetProjection -> r #

gmapQ :: (forall d. Data d => d -> u) -> URLGetProjection -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> URLGetProjection -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> URLGetProjection -> m URLGetProjection #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> URLGetProjection -> m URLGetProjection #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> URLGetProjection -> m URLGetProjection #

Ord URLGetProjection Source # 
Read URLGetProjection Source # 
Show URLGetProjection Source # 
Generic URLGetProjection Source # 
Hashable URLGetProjection Source # 
ToJSON URLGetProjection Source # 
FromJSON URLGetProjection Source # 
FromHttpApiData URLGetProjection Source # 
ToHttpApiData URLGetProjection Source # 
type Rep URLGetProjection Source # 
type Rep URLGetProjection = D1 (MetaData "URLGetProjection" "Network.Google.URLShortener.Types.Sum" "gogol-urlshortener-0.2.0-CfaHQDL5yUoLS52P0Ax06J" False) ((:+:) (C1 (MetaCons "UGPAnalyticsClicks" PrefixI False) U1) ((:+:) (C1 (MetaCons "UGPAnalyticsTopStrings" PrefixI False) U1) (C1 (MetaCons "UGPFull" PrefixI False) U1)))

URLHistory

data URLHistory Source #

Instances

Eq URLHistory Source # 
Data URLHistory Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> URLHistory -> c URLHistory #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c URLHistory #

toConstr :: URLHistory -> Constr #

dataTypeOf :: URLHistory -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c URLHistory) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c URLHistory) #

gmapT :: (forall b. Data b => b -> b) -> URLHistory -> URLHistory #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> URLHistory -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> URLHistory -> r #

gmapQ :: (forall d. Data d => d -> u) -> URLHistory -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> URLHistory -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> URLHistory -> m URLHistory #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> URLHistory -> m URLHistory #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> URLHistory -> m URLHistory #

Show URLHistory Source # 
Generic URLHistory Source # 

Associated Types

type Rep URLHistory :: * -> * #

ToJSON URLHistory Source # 
FromJSON URLHistory Source # 
type Rep URLHistory Source # 
type Rep URLHistory = D1 (MetaData "URLHistory" "Network.Google.URLShortener.Types.Product" "gogol-urlshortener-0.2.0-CfaHQDL5yUoLS52P0Ax06J" False) (C1 (MetaCons "URLHistory'" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_uhTotalItems") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Textual Int32)))) (S1 (MetaSel (Just Symbol "_uhNextPageToken") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)))) ((:*:) (S1 (MetaSel (Just Symbol "_uhItemsPerPage") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Textual Int32)))) ((:*:) (S1 (MetaSel (Just Symbol "_uhKind") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)) (S1 (MetaSel (Just Symbol "_uhItems") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe [URL])))))))

urlHistory :: URLHistory Source #

Creates a value of URLHistory with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

uhTotalItems :: Lens' URLHistory (Maybe Int32) Source #

Total number of short URLs associated with this user (may be approximate).

uhNextPageToken :: Lens' URLHistory (Maybe Text) Source #

A token to provide to get the next page of results.

uhItemsPerPage :: Lens' URLHistory (Maybe Int32) Source #

Number of items returned with each full "page" of results. Note that the last page could have fewer items than the "itemsPerPage" value.

uhKind :: Lens' URLHistory Text Source #

The fixed string "urlshortener#urlHistory".

uhItems :: Lens' URLHistory [URL] Source #

A list of URL resources.