tobymaxham/ux9-api
最新稳定版本:3.0.0
Composer 安装命令:
composer require tobymaxham/ux9-api
包简介
The offical UX9 URL Shortener API.
README 文档
README
Official UX9 URL Shortener API. Visit ux9.de for more Details.
Installation
composer require tobymaxham/ux9-api
Usage
There are different ways how to get your short URL. If you are using Laravel than try out laravel-junkies/url-shortener. It's an Laravel Package where you simply can use this:
$url = Shortener::short('https://example.com');
Initialize
$shortener = new TobyMaxham\Ux9\Shortener($url = null, $config = null, $format = 'json'); // set the API Token $shortener->setToken('YOUR_API_TOKEN');
Where $url can be a valid URL or an array containing URL's. The $format is the output/return format you specified. If you don't enter a format it will take the specified format defined in the configuration Array or the 'json' format.
Get short URL
$shortener->out();
Short Version
$shortener->short('http://maxham.de'); $shortener->short('http://github.com');
Here you will always get the string of the short url.
Options and parameters
// default = json, alternativ plain, array $shortener->format($format); $shortener->out($format); $shortener->add($url);
Configuration
$config = [ 'API_TOKEN' => 'YOUR_API_TOKEN', 'FORMAT' => 'plain', ]; $shortener = new TobyMaxham\Ux9\Shortener($url = null, $config);
Changelog
Please see CHANGELOG for more information on what has changed recently.
Security Vulnerabilities
If you've found a bug regarding security please mail git@maxham.de instead of using the issue tracker.
Support me
Credits
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 1
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-03-29