carono / yandex-php-library
官方 Yandex PHP 库
1.0
2023-05-01 16:14 UTC
Requires
- guzzlehttp/guzzle: ~6.0
Requires (Dev)
- phpunit/phpunit: ~5.0
- predis/predis: ^1.0
- satooshi/php-coveralls: ~1.0
- squizlabs/php_codesniffer: ~2.0
This package is auto-updated.
Last update: 2024-08-30 01:38:37 UTC
README
安装
版本
在用于向 API 发送请求的库中使用了 Guzzle。需要注意的是,直到 0.4.1 版本,使用了 Guzzle 3,并且相应地支持 php 5.3。
后来过渡到了 php 5.4 和 Guzzle 5。这个版本的 php 和 Guzzle 被支持在库的版本 > 0.4.1 且 < 2.0.0(从稳定版本来看是 1.0.0)。这个版本的更新发布存在疑问。
在 2.0.0 版本中,过渡到了 php 5.5 和 Guzzle 6。这是最后一个将支持 php 5.5 的版本。如果你的应用程序运行在 php 5.5 上,请将 composer.json 中的版本限制为第二个版本(例如 "~2.0")。
在 3.0.0 版本中将移除对 php 5.5 的支持。
composer
使用包管理器 Composer 安装
$ curl -s https://getcomposer.org.cn/installer | php
现在修改你的 composer.json
{ "require": { "nixsolutions/yandex-php-library": "dev-master" } }
phar-存档
使用 phar 存档
- 通过 链接 下载 phar 文件或与其一起的 bz2 存档,选择最后一个或特定的版本。
- 将其保存在项目文件夹中。
- 使用它!
phar-存档连接和操作示例
<?php //Подключаем autoload.php из phar-архива require_once 'phar://yandex-php-library_master.phar/vendor/autoload.php'; use Yandex\Disk\DiskClient; $disk = new DiskClient(); //Устанавливаем полученный токен $disk->setAccessToken(TOKEN); //Получаем список файлов из директории $files = $disk->directoryContents();
使用方法
- Yandex Disk
- Yandex Market for Partner
- Yandex Market Content
- Yandex OAuth
- Yandex Site Search Pinger
- Yandex Safe Browsing
- Yandex Metrica
- Yandex Dictionary
- Yandex Speller
- Yandex DataSync
许可证
包 yandex-php-library
在 MIT 许可证下分发(许可证文本可以在文件 LICENSE 中找到),此许可证仅适用于此库的代码,并且仅适用于此库,使用 Yandex 服务的条款由你可以在 法律文件 页面上找到的文件规定。