Try PBworks for yourself
View
 

ShortURLs

Page history last edited by Jeff Hodsdon 2 years, 1 month ago

This API is deprecated, and will be going away in the future.  Please see the documentation for the new API here.

 

Digg Short URLs

 


 

Fetches short URL information from Digg.

 

Example Request

 

Create a new Digg short URL for: http://www.google.com

 

 

http://services.digg.com/url/short/create?url=http%3A%2F%2Fwww.google.com3&appkey=http%3A%2F%2Fexample.com%2fapplication

 

Example Responses

 

XML

 

 

<?xml version="1.0" encoding="UTF-8"?>
<shorturls count="1" offset="0" timestamp="1238693806" total="1">
<shorturl itemid="11264084" link="http://www.google.com" short_url="http://digg.com/d1lGIm" view_count="0"/>
</shorturls>

 

JSON

 

 

{"shorturls":[
{"link":"http:\/\/www.google.com",
"short_url":"http:\/\/digg.com\/d1lGIm",
"itemid":11264084,
"view_count":0}
]}

 

PHP

 

 

O:16:"DiggAPIShortURLs":5:{s:9:"shorturls";a:1:{i:0;O:15:"DiggAPIShortURL":4:{s:4:"link";s:21:"http://www.google.com";s:9:"short_url";s:22:"http://digg.com/d1lGIm";s:6:"itemid";i:11264084;s:10:"view_count";i:0;}}s:9:"timestamp";i:1238697633;s:5:"total";i:1;s:5:"count";i:1;s:6:"offset";i:0;}

 

Endpoints

 

 

GET /url/short/create
Create a new Digg short URL.

503 Service unavailable indicates that you making too many requests, see BasicConcepts#BePolitePlease for more information.

GET /url/short/{Digg short url}
Information for a given Digg short URL.

404 Not Found indicates that the given short URL does not exist.

 

Arguments

 

Additional query string parameters to endpoints above. See also Response Types and Application Keys.

 

 

url
Required for the /url/short/create endpoint

the urlencoded URL you want to shorten, e.g.: http%3a%2f%2fwww.google.com

 

Comments (0)

You don't have permission to comment on this page.