jleagle/bitly-api-client

There is no license information available for the latest version (1.0.0) of this package.

Bitly API client.

1.0.0 2015-11-28 17:27 UTC

This package is auto-updated.

Last update: 2024-04-09 11:57:16 UTC


README

To use the class, you need to use one of three static methods.

If you have a bitly account username and password:

$bitly = Bitly::usernamePassword($username, $password);

If you have an access token (you can get one from https://bitly.com/a/oauth_apps):

$bitly = Bitly::accessToken($accessToken);

If you want to log the user in using OAuth:

$bitly = Bitly::authorize($clientId, $clientSecret, $projectUrl, $state);

From there you have access to each endpoint:

Return the click rate for content containing 'obama':

$realtimeClickrates = $bitly->shorten('https://github.com/Jleagle/bitly-api-client');