# Class PermalinkShareService

#### Hierarchy

- PermalinkShareService

- Defined in src/permalink/ShareService.js:52

#####
Index

### Properties

$http_
gmfShortenerCreateUrl_

### Methods

getShortUrl
postShortUrl_
sendShortUrl

## Properties

### $http_

$http_: IHttpService

- Defined in src/permalink/ShareService.js:56

### gmfShortenerCreateUrl_

gmfShortenerCreateUrl_: string

- Defined in src/permalink/ShareService.js:61

## Methods

### getShortUrl

- getShortUrl(url): ShortenerAPIResponse | IHttpPromise<void>

- Get a short URL of the permalink by calling the url shortener service.

  - If no shortener API url have been specified, it returns the permalink itself.

  #### Parameters

  - ##### url: string

    the permalink

  #### Returns ShortenerAPIResponse | IHttpPromise<void>

  an object containing the permalink not shortened or the promise attached to the shortener API request

  - Defined in src/permalink/ShareService.js:72

### postShortUrl_

- postShortUrl_(params): IHttpPromise<void>

- #### Parameters

  - ##### params: ShortenerAPIRequestParams

    parameters for the request

  #### Returns IHttpPromise<void>

  the promise attached to the shortener API request

  - Defined in src/permalink/ShareService.js:115

### sendShortUrl

- sendShortUrl(shortUrl, email, opt_message?): IHttpPromise<void>

- Send the short permalink to the email provided

  - If email is provided, the short permalink will be sent to this email

  #### Parameters

  - ##### shortUrl: string

    the short permalink to send

  - ##### email: string

    the email to which the short url must be send

  - ##### `Optional` opt_message: string

    message for the email

  #### Returns IHttpPromise<void>

  the promise attached to the shortener API request

  - Defined in src/permalink/ShareService.js:98

Generated using TypeDoc