定制 narendravaghela/bitly-client 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

narendravaghela/bitly-client

Composer 安装命令:

composer require narendravaghela/bitly-client

包简介

PHP client library to access Bitly APIs

关键字:

README 文档

README

Build Status License Latest Stable Version Total Downloads

PHP client library to access Bitly APIs. Register your account at Bitly.com and get your access token from here.

Requirements

This library has the following requirements:

  • PHP 5.6.x or greater.

Installation

You can install this library into your application using composer.

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,

<?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.

<?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.

Documentation

As of now, this library provides API methods for following modules.

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.

统计信息

  • 总下载量: 39.72k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 6
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 6
  • Watchers: 1
  • Forks: 5
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-11-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固