nybbl/url

Nybbl URL 短链接集成 API 库(v1)

1.0.0 2018-11-21 13:54 UTC

This package is auto-updated.

Last update: 2024-09-22 03:17:27 UTC


README

这是一个 Nybbl URL 短链接 API 的简单包装器,需要 PHP >= 7.0。

要求

  • PHP >= 7.0 且安装了 cURL 扩展,

安装

推荐使用 composer

$ composer require nybbl/url

基本用法

use Nybbl\Url;

$client = new Url\Client('<my endpoint>', '<my token>');
$response = $client->api('link')->create('https://nybbl.io/');

$client = new Url\Client('<my endpoint>', '<my token>');
$response = $client->api('link')->getOne(1);

$client = new Url\Client('<my endpoint>', '<my token>');
$response = $client->api('link')->getList();

贡献

欢迎提出任何评论,提交问题或发起拉取请求。