goadfly

package module
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2021 License: MIT Imports: 6 Imported by: 0

README

go-adfly

Library to working with adf.ly on Golang

installation

go get github.com/Sagleft/go-adfly

usage example:

client := goadfly.NewClient(userID, apiKeyPublic)
shortLink, err := client.ShortenLink("https://example.com")
if err != nil {
    log.Fatalln(err)
}

log.Println(shortLink)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	UserID       int64
	APIKeyPublic string
}

Client - ad.fly API client

func NewClient

func NewClient(userID int64, apiKeyPublic string) *Client

NewClient - create new ad.fly API client

func (c *Client) ShortenLink(urlToShorten string) (string, error)

ShortenLink - shorten new link

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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