mistrfilda/pid-api
Composer 安装命令:
composer require mistrfilda/pid-api
包简介
PID api integration using guzzle/http client
README 文档
README
Instalation
composer require mistrfilda/pid-api
Golemio
Currently supports V2 of API - https://api.golemio.cz/v2 - more about api on https://golemioapi.docs.apiary.io/
Usage
- Obtain access token - https://golemioapi.docs.apiary.io/
- Use new instance of prepared class with endpoints
$golemioService = new \Mistrfilda\Pid\Api\GolemioService('Your access token');
Supported endpoints with methods:
Each response returns data value object with obtained response. For example, get stops returns Stop response object
- GTFS stops (https://golemioapi.docs.apiary.io/#reference/public-transport/gtfs-stops/get-all-gtfs-stops) -
$golemioService->sendGetStopsRequest(); - GTFS trips (https://golemioapi.docs.apiary.io/#reference/public-transport/gtfs-trips/get-all-gtfs-trips) -
$golemioService->sendGetStopTripsRequest(); - GTFS stoptimes (https://golemioapi.docs.apiary.io/#reference/public-transport/gtfs-stops-times/get-gtfs-stop-times) -
$golemioService->sendGetStopTimesRequest(); - Vehicle positions (https://golemioapi.docs.apiary.io/#reference/public-transport/vehicle-positions/get-all-vehicle-positions) -
$golemioService->sendGetVehiclePositionRequest(); - Parkings (https://golemioapi.docs.apiary.io/#reference/parking/parking-lots/get-all-parking-lots) -
$golemioService->sendGetParkingLotRequest
| Endpoint | API doc url | Golemio service method |
|---|---|---|
| GTFS stops | https://golemioapi.docs.apiary.io/#reference/public-transport/gtfs-stops/get-all-gtfs-stops | $golemioService->sendGetStopsRequest(); |
| GTFS trips | https://golemioapi.docs.apiary.io/#reference/public-transport/gtfs-trips/get-all-gtfs-trips | $golemioService->sendGetStopTripsRequest(); |
| GTFS stoptimes | https://golemioapi.docs.apiary.io/#reference/public-transport/gtfs-stops-times/get-gtfs-stop-times | $golemioService->sendGetStopTimesRequest(); |
| Vehicle positions | https://golemioapi.docs.apiary.io/#reference/public-transport/vehicle-positions/get-all-vehicle-positions | $golemioService->sendGetVehiclePositionRequest(); |
| Parkings | https://golemioapi.docs.apiary.io/#reference/parking/parking-lots/get-all-parking-lots | $golemioService->sendGetParkingLotRequest(); |
RSS feeds
Usage
$rssService = new \Mistrfilda\Pid\Api\RssService();
Supported feeds
More info about rss feeds can be found here https://pid.cz/rss-kanal/.
- Planned transport restrictions - long term (https://pid.cz/feed/rss-vyluky) -
$rssService->getLongTermRestrictions() - Current transport restrictions - short term (https://pid.cz/feed/rss-mimoradnosti) -
$rssService->getShortTermRestrictions()
mistrfilda/pid-api 适用场景与选型建议
mistrfilda/pid-api 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 560 次下载、GitHub Stars 达 2, 最近一次更新时间为 2020 年 02 月 13 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 mistrfilda/pid-api 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 mistrfilda/pid-api 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 560
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 8
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-02-13