定制 sokolnikov911/yandex-schedule 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

sokolnikov911/yandex-schedule

Composer 安装命令:

composer require sokolnikov911/yandex-schedule

包简介

PHP Yandex Schedule (rasp) API client

README 文档

README

Latest Stable Version Total Downloads Latest Unstable Version License composer.lock

Russian version of README you can find here: README_RU.md.

Yandex Schedule (rasp) API client.

Examples

Retrieving schedule between two stations (for example: New Your airport and Moscow Sheremetyevo)

$client = new Client('yourApiKeyHere');

echo $client->getScheduleBetweenStations('NYC', 'SVO',
    Client::TRANSPORT_TYPE_PLANE, Client::SYSTEM_IATA);

Retrieving schedule by station (for example: Kyiv-Passazhyrsky railway station)

echo $client->getScheduleOnStation('2200001', Client::TRANSPORT_TYPE_TRAIN, Client::SYSTEM_EXPRESS);

Retrieving stations list for selected route (for example: train Berdyansk - Kiev)

echo $client->getListStationsRoute('228P_1_2');

Retrieving carrier information (for example: Turkish Airlines)

echo $client->getCarrier('TK', Client::SYSTEM_IATA);

Retrieving nearest stations

echo $client->getNearestStations('50.440046', '40.4882367', '40');

Retrieving yandex copyright block

echo $client->getCopyright();

Switching between data formats (XML and JSON available) and language versions (russian, ukrainian, turkish)

By default using JSON format and russian language.

$client->setDataFormat(Client::DATA_FORMAT_XML);
$client->setLanguage(Client::DATA_LANG_UK);

Installing

# Install Composer
curl -sS https://getcomposer.org/installer | php

Next, run the Composer command to install the latest stable version of yandex-schedule

php composer.phar require sokolnikov911/yandex-schedule

After installing, you need to require Composer's autoloader:

require 'vendor/autoload.php';

You can then later update yandex-schedule using composer:

composer.phar update

Requirements

This client requires at least PHP7 (yeahh, type hinting!) and Guzzle 6.

License

This library is licensed under the MIT License.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-06-18