tinyurl

package
v0.3.20 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 10, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const ServiceURL = "https://api.tinyurl.com/create"

ServiceURL is the API endpoint.

Variables

View Source
var ServiceTimeout = 3

ServiceTimeout is the timeout (in seconds) for requests to the TinyURL API.

Functions

This section is empty.

Types

type Service added in v0.3.6

type Service struct {
	APIKey     string
	Domain     string
	ServiceURL string
}

Service is the short link generation service implementation for TinyURL.

func NewTinyURLService

func NewTinyURLService(apiKey string, domain string) *Service

NewTinyURLService returns a new instance of the TinyURL short link service.

func (Service) Shorten added in v0.3.6

Shorten implements the Short Link generation service interface.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL