Google Shortener

The Google URL Shortener at goo.gl is a service that takes long URLs and squeezes them into fewer characters to make a link that is easier to share, tweet, or email to friends. The URL Shortener API allows you to develop applications that interface with this service. You can use simple HTTP methods to create, inspect, and manage goo.gl short URLs from your desktop, mobile, or web application.

Instantiate Shortener
$shortener = eden('google')->shortener('[API_KEY]');
Shortener Methods
Method Arguments Returns Description
$shortener->getList(); none array Retrieves a list of URLs shortened by the authenticated user
$shortener->getAnalytics($url);
  1. string
  2. - short url
array Returns full analytics of this short url
$shortener->createShortUrl($url);
  1. string
  2. - long url
array Creates a new short URL
$shortener->setStartToken($startToken);
  1. string
array Set start token
$shortener->setProjection($projection);
  1. string
array Acceptable values are: 'ANALYTICS_CLICKS' - Returns only click counts. 'ANALYTICS_TOP_STRINGS' - Returns only top string counts. 'FULL' - Returns the creation timestamp and all available analytics.

© 2012 Openovate Labs. All rights reserved.