# 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: string): 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.

  ### Returns

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

  #### Parameters

  - ##### url: string

    the permalink

  #### Returns ShortenerAPIResponse | IHttpPromise<void>

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

### postShortUrl_

- postShortUrl_(params: ShortenerAPIRequestParams): IHttpPromise<void>

- ### Returns

  the promise attached to the shortener API request

  #### Parameters

  - ##### params: ShortenerAPIRequestParams

    parameters for the request

  #### Returns IHttpPromise<void>

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

### sendShortUrl

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

- Send the short permalink to the email provided

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

  ### Returns

  the promise attached to the shortener API request

  #### 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>

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

Generated using TypeDoc