承接 incapption/bunny-purge 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

incapption/bunny-purge

最新稳定版本:v1.0.0

Composer 安装命令:

composer require incapption/bunny-purge

包简介

Bunny CDN API class for purging files

README 文档

README

Tiny package for purging files on BunnyCN (https://bunny.net) using Guzzle HTTP client.

Usage

$client = new BunnyPurge('YOUR_BUNNY_API_KEY');
$client->purge('https://example.b-cdn.net/example.jpg');

$client->purge() throws BunnyException on non 200 status codes and GuzzleException on request exceptions.

Tests

Create a phpunit.xml in the project directory and add PHP variables for your API Key and a test URL pointing to a file on your CDN.

<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="vendor/autoload.php" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" processIsolation="false" stopOnFailure="true" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
  <coverage>
    <include>
      <directory suffix=".php">src/</directory>
    </include>
  </coverage>
  <testsuites>
    <testsuite name="Project Test Suite">
      <directory>tests</directory>
    </testsuite>
  </testsuites>
  <php>
    <var name="API_KEY" value="YOUR_BUNNY_API_KEY"/>
    <var name="TEST_URL" value="https://example.b-cdn.net/example.jpg"/>
  </php>
</phpunit>

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-03-04