C# Class IronPigeon.Providers.GoogleUrlShortener

Inheritance: IUrlShortener
Show file Open project: AArnott/IronPigeon Class Usage Examples

Public Methods

Method Description
GoogleUrlShortener ( ) : System

Initializes a new instance of the GoogleUrlShortener class.

GoogleUrlShortener ( HttpClient httpClient ) : System

Initializes a new instance of the GoogleUrlShortener class.

ShortenAsync ( Uri longUrl, CancellationToken cancellationToken ) : Task

Shortens the specified long URL.

Method Details

GoogleUrlShortener() public method

Initializes a new instance of the GoogleUrlShortener class.
public GoogleUrlShortener ( ) : System
return System

GoogleUrlShortener() public method

Initializes a new instance of the GoogleUrlShortener class.
public GoogleUrlShortener ( HttpClient httpClient ) : System
httpClient System.Net.Http.HttpClient The HTTP client.
return System

ShortenAsync() public method

Shortens the specified long URL.
public ShortenAsync ( Uri longUrl, CancellationToken cancellationToken ) : Task
longUrl System.Uri The long URL.
cancellationToken System.Threading.CancellationToken The cancellation token.
return Task