slvler/cuttly

Cuttly API 的 Laravel 包装器

v1.0.2 2023-08-09 17:32 UTC

This package is auto-updated.

Last update: 2024-09-12 01:01:50 UTC


README

tests Latest Stable Version Latest Unstable Version License Total Downloads

此包为 Laravel 应用程序提供对 Cuttly API 的便捷包装。

要求

  • PHP 8.0+
  • Laravel 9.x

安装

要安装此包,您可以使用 composer

    composer require slvler/cuttly

用法

查找播放器

    $data = [
        'short' => 'google.com'
        ];

    Cuttly::short($data);

URL 缩短器

{
  "url": {
    "status": 7,
    "fullLink": "http://google.com",
    "date": "2023-08-07",
    "shortLink": "https://cutt.ly/ewdVijlY",
    "title": "Google"
  }
}

编辑 URL

    $data = [
       'edit' => 'cutt.ly/LwdCoBmo'
       ];

    Cuttly::edit($data);

编辑 URL

{
  "url": {
    "status": 1,
  }
}

查找游戏

    $data = [
       'stats' => 'cutt.ly/ewdVijlY'
       ];

    Cuttly::stats($data);

URL 统计

{
  "stats": {
    "status": 1,
    "clicks": 0,
    "date": "2023-08-07",
    "title": "Google",
    "fullLink": "http://google.com",
    "shortLink": "https://cutt.ly/ewdVijlY",
    "facebook": 0,
    "twitter": 0,
    "pinterest": 0,
    "instagram": 0,
    "googlePlus": 0,
    "linkedin": 0,
    "rest": 0,
    "devices": {
      
    },
    "refs": {
      
    },
    "bots": "Insufficient subscription level"
  }
}

测试

    composer test

致谢

许可证

MIT 许可证(MIT)。请参阅 许可证文件 了解更多信息。

贡献

非常欢迎您贡献。请参阅 贡献指南 了解详情。