sharpapi/sharpapi-php-client 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

sharpapi/sharpapi-php-client

最新稳定版本:v2.0.0

Composer 安装命令:

composer require sharpapi/sharpapi-php-client

包简介

[DEPRECATED] This package is no longer maintained. Please use specific endpoint packages instead. SharpAPI.com - AI-Powered Swiss Army Knife API.

README 文档

README

SharpAPI GitHub cover

⚠️ DEPRECATED: SharpAPI PHP Client SDK

🔴 This Package is No Longer Maintained

This monolithic package (sharpapi/sharpapi-php-client) has been deprecated and replaced with specialized, endpoint-specific packages.

Why the Change?

  • Better Performance: Install only what you need
  • Smaller Dependencies: Reduced package size
  • Easier Maintenance: Each endpoint has its own repository
  • Clearer Documentation: Focused docs for each feature
  • Faster Updates: Independent versioning per endpoint

✅ What Should You Use Instead?

Please migrate to the new specialized packages listed below. Each package is focused on a specific SharpAPI endpoint and provides a cleaner, more maintainable solution.

📦 New Specialized Packages

📝 Content & Marketing Automation

Package Description Installation
php-content-summarize-text AI-powered text summarization composer require sharpapi/php-content-summarize-text
php-content-text-translator Advanced text translator (80+ languages) composer require sharpapi/php-content-text-translator
php-content-paraphrase-text Paraphrase and rephrase content composer require sharpapi/php-content-paraphrase-text
php-content-proofread-grammar Proofread text and check grammar composer require sharpapi/php-content-proofread-grammar
php-content-keywords-tags Generate keywords and tags from content composer require sharpapi/php-content-keywords-tags
php-content-spam-detector Detect spam content with confidence score composer require sharpapi/php-content-spam-detector
php-content-phone-detector Extract and format phone numbers composer require sharpapi/php-content-phone-detector
php-content-url-detector Extract and validate URLs from text composer require sharpapi/php-content-url-detector
php-content-email-detector Extract and validate email addresses composer require sharpapi/php-content-email-detector

🛒 E-commerce

Package Description Installation
php-ecommerce-product-review-sentiment Analyze product review sentiment composer require sharpapi/php-ecommerce-product-review-sentiment
php-ecommerce-product-categorization Categorize products with AI composer require sharpapi/php-ecommerce-product-categorization
php-ecommerce-product-intro-generator Generate product introductions composer require sharpapi/php-ecommerce-product-intro-generator
php-ecommerce-thank-you-email Generate personalized thank you emails composer require sharpapi/php-ecommerce-thank-you-email

🧑‍💻 HR Tech

Package Description Installation
php-hr-related-skills Find related skills with relevance scores composer require sharpapi/php-hr-related-skills
php-hr-related-job-positions Find similar job positions composer require sharpapi/php-hr-related-job-positions
php-hr-job-description-generator Generate professional job descriptions composer require sharpapi/php-hr-job-description-generator

✈️ Travel, Tourism & Hospitality

Package Description Installation
php-travel-review-sentiment Analyze travel review sentiment composer require sharpapi/php-travel-review-sentiment
php-travel-hospitality-categorization Categorize hospitality products composer require sharpapi/php-travel-hospitality-categorization
php-travel-tours-activities-categorization Categorize tours and activities composer require sharpapi/php-travel-tours-activities-categorization

🔍 SEO

Package Description Installation
php-seo-tags-generator Generate SEO and social media META tags composer require sharpapi/php-seo-tags-generator

🛠️ Utilities

Package Description Installation
php-utility-airports Global airports database (30,000+ airports) composer require sharpapi/php-utility-airports
php-utility-job-positions Job positions database API composer require sharpapi/php-utility-job-positions

🔄 Migration Guide

Before (Old Package)

use SharpAPI\SharpApiService\SharpApiService;

$sharpApi = new SharpApiService(SHARP_API_KEY);
$statusUrl = $sharpApi->summarizeText($text, 'English');
$result = $sharpApi->fetchResults($statusUrl);

After (New Specialized Package)

use SharpAPI\ContentSummarize\SummarizeTextClient;

$client = new SummarizeTextClient(apiKey: SHARP_API_KEY);
$statusUrl = $client->summarizeText(
    content: $text,
    language: 'English'
);
$result = $client->fetchResults($statusUrl);

Key Differences

  1. Focused Imports: Import only the client you need
  2. Named Parameters: Use modern PHP 8.0+ named arguments
  3. Better Type Safety: Improved type hints and validation
  4. Smaller Footprint: Only install dependencies for features you use

⚠️ Important Notes

For Existing Users

This package will continue to work for projects that already use it. The source code remains unchanged, so your existing implementations won't break.

However, we strongly recommend migrating to the new specialized packages because:

  • ✅ This package will not receive any new features
  • ✅ Bug fixes and security updates will be limited
  • ✅ New SharpAPI endpoints will only be available in specialized packages
  • ✅ Better performance and smaller dependency footprint
  • ✅ Active development and support

When to Migrate

  • New Projects: Always use the new specialized packages
  • Existing Projects: Migrate during your next major update
  • composer update: You'll see deprecation warnings, but your code will still work

📚 Resources

💬 Need Help?

  • Questions? Open an issue on the specific package's GitHub repository
  • Feature Requests? Submit them to the relevant specialized package
  • General Support? Visit https://sharpapi.com/documentation

📜 Old Documentation (For Reference Only)

Click to expand old documentation (for existing users)

Installation

composer require sharpapi/sharpapi-php-client

Requirements

  • PHP >= 8.1

Basic Usage

$sharpApi = new \SharpAPI\SharpApiService\SharpApiService(SHARP_API_KEY);

$statusUrl = $sharpApi->summarizeText($text, 'English');
$result = $sharpApi->fetchResults($statusUrl);

var_dump($result->getResultJson());

For complete documentation, please refer to the specialized packages listed above.

License

The MIT License (MIT). Please see License File for more information.

Thank you for using SharpAPI! Please migrate to our new specialized packages for the best experience.

SharpAPI

sharpapi/sharpapi-php-client 适用场景与选型建议

sharpapi/sharpapi-php-client 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 17 次下载、GitHub Stars 达 4, 最近一次更新时间为 2023 年 12 月 10 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「php」 「api」 「e-commerce」 「artificial intelligence」 「travel」 「natural language processing」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 sharpapi/sharpapi-php-client 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 sharpapi/sharpapi-php-client 我们能提供哪些服务?
定制开发 / 二次开发

基于 sharpapi/sharpapi-php-client 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-12-10