tobymaxham/ux9-api 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

tobymaxham/ux9-api

最新稳定版本:3.0.0

Composer 安装命令:

composer require tobymaxham/ux9-api

包简介

The offical UX9 URL Shortener API.

README 文档

README

UX9 URL Shortener API

Latest Version on Packagist MIT Licensed Total Downloads Support me on Patreon

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

ko-fi
Support me on Patreon

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-03-29