philnash / bitly

🗜 A Ruby wrapper for the bit.ly API
https://rubygems.org/gems/bitly
MIT License
451 stars 139 forks source link

Add user link_history endpoint #15

Closed philnash closed 12 years ago

philnash commented 13 years ago

/v3/user/link_history

OAuth 2 endpoint that provides a given user’s link shortening history, in reverse chronological order (most recent to least recent).

Parameters

access_token is the OAuth access token for a bitly user.
format (optional) indicates the requested response format. supported formats: json (default), xml.
limit (optional, default: 50) indicated the number of results to return.
offset (optional) indicates the number of results to skip (ie, offset=1 skips the most recent link, offset=10 skips the 10 most recent link, offset=50 would paginate the default result set).
created_before (optional) unix timestamp indicating only to return links created at or before the specified time.
created_after (optional) unix timestamp indicating only to return links created at or after the specified time.

Note

This endpoint is only available on https://api-ssl.bitly.com/
This endpoint returns a maximum of 100 results.

Output

long_url is the long link that was shortened.
link is this particular user's bitly link for the specified long_url.
aggregate_link is the global bitly link for the specified long_url which can be used to track aggregate stats across all matching bitly links.
created_at is a unix timestamp representing the time at which the long_url was first shortened by this user.
title is the page title of the long_url.
philnash commented 12 years ago

Done in v0.7.0