定制 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);

统计信息

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

GitHub 信息

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

其他信息

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

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固