Skip to content
This repository has been archived by the owner on Mar 20, 2022. It is now read-only.

spiegel-im-spiegel/gitioapi

Repository files navigation

Git.io Web API Package

Build Status

Git.io Web API

Refer to “Git.io: GitHub URL Shortener”.

Code Generation

Example

package gitioapi_test

import (
	"fmt"
	"github.com/spiegel-im-spiegel/gitioapi"
)

func ExampleEncode() {
	shortUrl, _ := gitioapi.Encode(&gitioapi.Param{Url: "https://github.com/technoweenie", Code: "t"})
	fmt.Print(shortUrl)
	// http://git.io/t:
}

func ExampleDecode() {
	shortUrl, _ := gitioapi.Decode(&gitioapi.Param{Url: "http://git.io/t"})
	fmt.Print(shortUrl)
	// https://github.com/technoweenie
}

License

These codes are licensed under CC0.

CC0

About

Git.io Web API Package

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages