承接 solwee/pixt-api 相关项目开发

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

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

solwee/pixt-api

最新稳定版本:0.1.1

Composer 安装命令:

composer require solwee/pixt-api

包简介

Pix.T Api

README 文档

README

Overview

The objective of the project is to develop a straightforward PHP client for the PixT API. PixT technology offers an easy method for image creators to certify their images, thereby enhancing their trustworthiness.

Installation

To install latest version of solwee/pixt-api use Composer.

Documentation

ClientInterface is designed to handle operations related to image processing and retrieval. It includes methods for generating presigned URLs for image uploads, uploading data to these URLs, and retrieving image certificates.

Methods

getPresignedURL

  • Description: Generates a presigned URL for uploading an image.
  • Parameters:
    • $imageFileName (string): The name of the image file for which the presigned URL will be generated.
  • Returns: PresignedUrl - An object representing the presigned URL.

putToPresignedURL

  • Description: Uploads data to a given presigned URL.
  • Parameters:
    • $presignedUrl (PresignedUrl): The presigned URL to which the data will be uploaded.
    • $data (string): The data to be uploaded, typically the image file's content.
  • Returns: int - The HTTP status code indicating the result of the upload operation.

getImageCertificate

  • Description: Retrieves a certificate for a specified image.
  • Parameters:
    • $imageId (string): The unique identifier of the image.
    • $keywords (bool, optional): A flag to include keywords in the certificate. Defaults to false.
  • Returns: ImageCertificate - An object containing the image's certificate details.

Usage Example

$client = new Solwee\Pixt\Client(
  new \GuzzleHttp\Client(),
    "https://partner.pixt.42cloud.io",
    "<super secret token>",
);

// Get a presigned URL for an image upload
$presignedUrl = $client->getPresignedURL("example.jpg");

// Upload image data to the presigned URL
$imageData = file_get_contents("example.jpg");
$status = $client->putToPresignedURL($presignedUrl, $imageData);

// Retrieve the certificate for the image
$imageCertificate = $client->getImageCertificate("image123", true);

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: proprietary
  • 更新时间: 2023-12-13