https://github.com/carono/yandex-php-library
https://github.com/carono/yandex-php-library
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/carono/yandex-php-library
- Owner: carono
- License: mit
- Created: 2023-05-01T16:13:02.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2023-05-01T16:54:42.000Z (about 2 years ago)
- Last Synced: 2024-12-29T12:19:51.579Z (5 months ago)
- Language: PHP
- Size: 345 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- 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)
## Установка
### Версии
В библиотеке для отправки запросов к 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/)