https://github.com/corpsepk/yandex-php-library
https://github.com/corpsepk/yandex-php-library
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/corpsepk/yandex-php-library
- Owner: corpsepk
- License: mit
- Created: 2022-03-24T11:17:45.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2022-03-31T08:29:22.000Z (about 4 years ago)
- Last Synced: 2025-02-06T11:32:39.005Z (over 1 year ago)
- Language: PHP
- Size: 360 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
PHP библиотека к API Яндекса
============================
[](https://gitter.im/nixsolutions/yandex-php-library?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[](https://travis-ci.org/nixsolutions/yandex-php-library)
[](https://packagist.org/packages/nixsolutions/yandex-php-library)
[](https://packagist.org/packages/nixsolutions/yandex-php-library)
[](https://scrutinizer-ci.com/g/nixsolutions/yandex-php-library/?branch=master)
[](https://coveralls.io/r/nixsolutions/yandex-php-library)
[](https://www.versioneye.com/user/projects/53a1549983add72cb9000014)
[](https://packagist.org/packages/nixsolutions/yandex-php-library)
## Deprecated
Поддержка SDK приостановлена 29.01.2019.
Использование в продакшене исключительно на свой страх и риск, не гарантируется корректная работа всех методов, ввиду постоянных изменений со стороны Яндекс API.
## Установка
### Версии
В библиотеке для отправки запросов к API используется Guzzle. Причем следует иметь в виду что вплоть до 0.4.1
включительно использовался [Guzzle 3](https://github.com/guzzle/guzzle3) и соответственно поддерживался php 5.3.
Позже был сделан переход к php 5.4 и [Guzzle 5](https://github.com/guzzle/guzzle/tree/5.3). Эта версия php и Guzzle
поддерживаются в версиях библиотеки > 0.4.1 и < 2.0.0 (из стабильных релизов это 1.0.0).
Выпуск обновлений для этой версии под вопросом.
В 2.0.0 был сделан переход к php 5.5 и [Guzzle 6](https://github.com/guzzle/guzzle). Это последняя версия которая будет поддерживать php 5.5. Если ваше приложение работает на php 5.5 ограничьте версию в composer.json 2й версией (например так "~2.0")
В версии 3.0.0 будет убрана поддержка php 5.5.
### composer
Установка с использованием менеджера пакетов [Composer](http://getcomposer.org):
```bash
$ curl -s https://getcomposer.org/installer | php
```
Теперь вносим изменения в ваш `composer.json`:
```yaml
{
"require": {
"nixsolutions/yandex-php-library": "dev-master"
}
}
```
### phar-архив
Работа с [phar архивом](http://php.net/manual/en/book.phar.php):
1. Скачиваем по [ссылке](http://yadi.sk/d/26YmC3hRByBd7) phar-файл или bz2-архив с ним, последней или конкретной версии.
2. Сохраняем в папку с проектом.
3. Используем!
Пример подключения и работа с библиотекой из phar-архива:
```php
setAccessToken(TOKEN);
//Получаем список файлов из директории
$files = $disk->directoryContents();
```
## Использование
* [Yandex Disk](https://github.com/nixsolutions/yandex-php-library/wiki/Yandex-Disk)
* [Yandex Market for Partner](https://github.com/nixsolutions/yandex-php-library/wiki/Yandex-Market-for-Partner)
* [Yandex Market Content](https://github.com/nixsolutions/yandex-php-library/wiki/Yandex-Market-Content)
* [Yandex OAuth](https://github.com/nixsolutions/yandex-php-library/wiki/Yandex-OAuth)
* [Yandex Site Search Pinger](https://github.com/nixsolutions/yandex-php-library/wiki/Yandex-Site-Search-Pinger)
* [Yandex Safe Browsing](https://github.com/nixsolutions/yandex-php-library/wiki/Yandex-Safe-Browsing)
* [Yandex Metrica](https://github.com/nixsolutions/yandex-php-library/wiki/Yandex-Metrica)
* [Yandex Dictionary](https://github.com/nixsolutions/yandex-php-library/wiki/Yandex-Dictionary)
* [Yandex Speller](https://github.com/nixsolutions/yandex-php-library/wiki/Yandex-Speller)
* [Yandex DataSync](https://github.com/nixsolutions/yandex-php-library/wiki/Yandex-DataSync)
## Лицензия
Пакет `yandex-php-library` распространяется под лицензией MIT (текст лицензии вы найдёте в файле
[LICENSE](https://raw.github.com/nixsolutions/yandex-php-library/master/LICENSE)), данная лицензия
распространяется на код данной библиотеки и только на неё, использование сервисов Яндекс регулируются
документами, которые вы сможете найти на странице [Правовые документы](http://legal.yandex.ru/)