aticmatic/envatophp
Composer 安装命令:
composer require aticmatic/envatophp
包简介
A Laravel package for interacting with the Envato API.
README 文档
README
This package provides an easy way to interact with the Envato API in your Laravel 10/11 applications.
Installation
composer require aticmatic/envatophp
Publish the configuration file:
php artisan vendor:publish --tag=envato-php-config
Add your Envato Personal Token to your .env file:
ENVATO_PERSONAL_TOKEN=your_actual_envato_personal_token
Usage
use AticMatic\EnvatoPHP\Facades\EnvatoPHP; try { $itemDetails = EnvatoPHP::getItemDetails(20787128); } catch (\Exception $e) { echo "Error: " . $e->getMessage(); Log::error($e); }
Available Methods
(Documentation will get updated for each API method as implemented)
getItemDetails(int $itemId): Retrieves details about a specific Envato item. Returns an array of item data or throws an exception on error.- (Other methods will be here as we develop them)
Error Handling
The package throws exceptions when API requests fail. It's crucial to wrap your API calls in try-catch blocks to handle these exceptions gracefully. The exceptions will contain details about the error returned by the Envato API. It's also recommended to log the exceptions for debugging purposes.
Contributing
Contributions are welcome! Please open an issue or submit a pull request.
License
This package is open-source software licensed under the MIT license.
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-02-06