2017 © Pedro Peláez
 

library bitly-client

PHP client library to access Bitly APIs

image

narendravaghela/bitly-client

PHP client library to access Bitly APIs

  • Thursday, December 15, 2016
  • by narendravaghela
  • Repository
  • 1 Watchers
  • 1 Stars
  • 724 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 4 Forks
  • 0 Open issues
  • 2 Versions
  • 35 % Grown

The README.md

Bitly PHP Client

Build Status License Latest Stable Version Total Downloads, (*1)

PHP client library to access Bitly APIs. Register your account at Bitly.com and get your access token from here., (*2)

Requirements

This library has the following requirements: * PHP 5.6.x or greater., (*3)

Installation

You can install this library into your application using composer., (*4)

composer require narendravaghela/bitly-client

Usage

Once you install this library, load it using the composer autoload option and use the BitlyClient class object. See below example,, (*5)

<?php

require 'vendor/autoload.php';

use Bitly\BitlyClient;

$bitlyClient = new BitlyClient('your-access-token');

$options = ['longUrl' => 'http://www.example.com/a-log-url-slug/'];

$response = $bitlyClient->shorten($options);

Response format

Bitly suppoerts json, xml and txt response types. You can specify the response type in your $options array. The default response format is json., (*6)

<?php

require 'vendor/autoload.php';

use Bitly\BitlyClient;

$bitlyClient = new BitlyClient('your-access-token');

$options = [
    'longUrl' => 'http://www.example.com/a-log-url-slug/',
    'format' => 'xml' // pass json, xml or txt
];

$response = $bitlyClient->shorten($options);

We recommend to use json and xml formats only as txt response sometimes does not work., (*7)

Documentation

As of now, this library provides API methods for following modules. * Links, (*8)

Reporting Issues & Contributing

If you have a problem with this libray or any bug, please open an issue on GitHub. Also, if you have solution to any existing bug, create a Pull Request. This library follows PSR-2 standards, so please make sure you follow the same while making changes., (*9)

The Versions

15/12 2016

dev-master

9999999-dev https://github.com/narendravaghela/bitly-client

PHP client library to access Bitly APIs

  Sources   Download

MIT

The Requires

 

The Development Requires

php bitly

15/12 2016

v1.0.0

1.0.0.0 https://github.com/narendravaghela/bitly-client

PHP client library to access Bitly APIs

  Sources   Download

MIT

The Requires

 

The Development Requires

php bitly