承接 giveitsmaller/sdk 相关项目开发

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

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

giveitsmaller/sdk

Composer 安装命令:

composer require giveitsmaller/sdk

包简介

PHP SDK for GISL (Give It Smaller) compression service

README 文档

README

The official PHP SDK for Give It Smaller (GISL) — a file compression and media-processing service. Compress, convert, thumbnail, and merge images, video, audio, and documents from PHP 8.1+.

Read-only mirror. This repository is automatically published from Give It Smaller's private monorepo on each release. Do not open issues or pull requests here — they are not monitored. Licensed under Apache-2.0.

📖 Full documentation →

Install

The SDK code-targets PSR-18 / PSR-17 and resolves a concrete HTTP client at runtime via php-http/discovery. Install the SDK plus any PSR-18 implementation — Guzzle is the path of least resistance:

composer require giveitsmaller/sdk guzzlehttp/guzzle http-interop/http-factory-guzzle

Requires PHP ^8.1.

Bring your own PSR-18 client. The SDK's runtime imports only PSR-18 interfaces, so you can use any implementation (e.g. Symfony HttpClient) instead of Guzzle — inject it via Gisl::create(httpClient: ...). Published on Packagist — the composer require above is all you need (no repositories block or auth token). See the install notes for the BYO-client and dev-checkout options.

Quickstart

The SDK is file-first: you always start from a file (->file($path) for one, ->files([$paths]) for many) and call operations on it.

<?php
require 'vendor/autoload.php';

use Gisl\Sdk\Gisl;
use Gisl\Sdk\Generated\SdkSpec\Enums\OptimizeFor;

$client = Gisl::create(apiKey: 'sk_...'); // or rely on GISL_API_KEY / ~/.gisl/credentials

$result = $client
    ->file('./photo.jpg')
    ->compress(optimize: OptimizeFor::Balanced)
    ->run(maxWait: '5m');

echo $result->url; // pre-signed download URL

Operation-first also ships. A lower-level $client->compress($path, [...])->run(new RunOptions(...)) form (and thumbnail / convert) is available as an escape hatch, but file-first is the recommended direction the examples build on.

Documentation

Guide What's in it
Getting started install, auth, quickstart, core concepts
Client reference every method, the ergonomic builders, operation options
Progress events (SSE) subscribe to live job progress
Webhooks verify and handle callback deliveries
Errors exception hierarchy and retry guidance
Examples runnable, per-operation walkthroughs

License

Apache-2.0 — see the LICENSE file.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2026-07-13

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固