sunnights / tinyurl-wrapper

A wrapper of tinyurl to a json feeds.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tinyurl-wrapper

A wrapper for tinyurl

  • Based on GAE
  • Programmed with Go
  • Backend updates transformed urls for every entity regularly and automatically.
  • A jar will be provided for different client with project tinyurl4j.

Param and Return

Param:

Query Type Comment
q string Original url which wanna be shorted.

Return:

Var Type Comment
status bool Success request or not(false).
q string Original url which wanna be shorted.
result string The shorted url by tinyurl.
stored bool True if the result is direct from our own database instead of calling tinyurl.

Example

Query:

https://tinyurl-wrapper.appspot.com/?q=http://www.online.sh.cn

Return:

{
  "status": true,
  "q": "http://www.online.sh.cn",
  "result": "http://tinyurl.com/4fwf4",
  "stored": false
}

About

A wrapper of tinyurl to a json feeds.

License:Apache License 2.0


Languages

Language:Go 100.0%