mp-php / fuel-packages-bitly
Installs: 17
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:fuel-package
Requires
This package is auto-updated.
Last update: 2024-10-19 20:39:16 UTC
README
Install
Setup to fuel/packages/bitly
- Use composer https://packagist.org/packages/mp-php/fuel-packages-bitly
- git submodule add
- Download zip
Usage
1: Configuration
- Get login & apikey http://bitly.com/a/your_api_key
- Copy packages/bitly/config/bitly.php to under app/config directory.
- Edit bitly.php that copied.
2: Enable bitly package.
In app/config/config.php
'always_load' => array('packages' => array(
'bitly',
...
or
In your code
Package::load('bitly');
Supported API
/v3/expand
Bitly::expand('http://bit.ly/MiCtW6'); // 'http://google.com/'
/v3/shorten
Bitly::shorten('http://google.com/') // 'http://bit.ly/MiCtW6'