Skip to content

Andreas-Koepke/bitly-php-api-wrapper

 
 

Repository files navigation

Bit.ly PHP api wrapper

The Bit.ly name is trademark of Bit.ly!

Simple PHP wrapper for the Bit.ly API V4.

Support PHP >= 5.6

If you like or use this project, star it!

CI / CD Status
Packagist Total Downloads
Semaphore CI Build Status
Scrutinizer Scrutinizer Code Quality
Scrutinizer Code Coverage
Scrutinizer Build Status
Codecov codecov
StyleCI StyleCI
Coveralls Coverage Status
CircleCI CircleCI
Sonarcloud Quality Gate Status

Install

$ composer require sineverba/bitly-php-api-wrapper

Usage

<?php

require_once ('vendor/autoload.php');

use Bitlywrap\Auth\Auth;
use Bitlywrap\Adapter\Adapter;
use Bitlywrap\Wrapper\Wrapper;

$token = 'your_generic_access_token';

$auth = new Auth($token);
$adapter = new Adapter($auth);
$wrapper = new Wrapper($adapter);

$long_url = 'http://www.example.com';

$short_url = $wrapper->getShortLink($long_url);

echo $short_url; // http://bit.ly/2HzJUKT

Contributions

Contributions are welcome and will be fully credited.

About

PHP Wrapper for Bit.ly API v4

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 96.3%
  • Makefile 3.7%