All Projects → ark930 → shanghai-bus

ark930 / shanghai-bus

Licence: other
上海公交信息实时查询接口

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to shanghai-bus

Mediator.net
A simple mediator for .Net for sending command, publishing event and request response with pipelines supported
Stars: ✭ 237 (+323.21%)
Mutual labels:  bus
psr-container-messenger
Message bus and queue for Mezzio with Symfony Messenger + Enqueue
Stars: ✭ 24 (-57.14%)
Mutual labels:  bus
godsend
A simple and eloquent workflow for streaming messages to micro-services.
Stars: ✭ 15 (-73.21%)
Mutual labels:  bus
can-prog
Command-line tool to flashing devices by CAN-BUS
Stars: ✭ 66 (+17.86%)
Mutual labels:  bus
european-transport-operators
NOT UP-TO-DATE ANYMORE, UNMAINTAINED. CHECK european-transport-feeds INSTEAD. List of european long-distance transport operators, available API endpoints, GTFS feeds and client modules.
Stars: ✭ 47 (-16.07%)
Mutual labels:  bus
timetable
Bus Timetable app React Native
Stars: ✭ 61 (+8.93%)
Mutual labels:  bus
Zebus
A lightweight Peer to Peer Service Bus
Stars: ✭ 222 (+296.43%)
Mutual labels:  bus
ReactiveBus
🚍 Reactive Event Bus for JVM (1.7+) and Android apps built with RxJava 2
Stars: ✭ 17 (-69.64%)
Mutual labels:  bus
StaticBus
🚌 A static bus use in modules.
Stars: ✭ 15 (-73.21%)
Mutual labels:  bus
Metro-Weapp
微信小程序-上海地铁Lite
Stars: ✭ 15 (-73.21%)
Mutual labels:  shanghai
rime-wugniu zaonhe
上海吳語拼音輸入方案 · 上海吴语拼音输入方案 · Rime input schemas for Shanghai Dialects
Stars: ✭ 20 (-64.29%)
Mutual labels:  shanghai
J1939-Framework
Framework to work with J1939 Frames used in CAN bus in bus, car and trucks industries
Stars: ✭ 123 (+119.64%)
Mutual labels:  bus
bmtc
Ruby wrapper for Bangalore Metropolitan Transport Corporation BMTC Intelligent Transport System (ITS) API
Stars: ✭ 13 (-76.79%)
Mutual labels:  bus
Bus
Bus 是一个基础框架、服务套件,它基于Java8编写,参考、借鉴了大量已有框架、组件的设计,可以作为后端服务的开发基础中间件。代码简洁,架构清晰,非常适合学习使用。
Stars: ✭ 253 (+351.79%)
Mutual labels:  bus
arrivelah
Fast simple API for bus arrival times in Singapore.
Stars: ✭ 67 (+19.64%)
Mutual labels:  bus
Busrouter Sg
BusRouter SG: Singapore Bus Routes Explorer
Stars: ✭ 238 (+325%)
Mutual labels:  bus
ALBusSeatView
Bus Seat View Selection
Stars: ✭ 95 (+69.64%)
Mutual labels:  bus
cocotb-bus
Pre-packaged testbenching tools and reusable bus interfaces for cocotb
Stars: ✭ 20 (-64.29%)
Mutual labels:  bus
hk-independent-bus-eta
獨立無廣告巴士預報 App
Stars: ✭ 20 (-64.29%)
Mutual labels:  bus
can2mqtt
Bidirectional CAN-Bus to MQTT-Bridge
Stars: ✭ 39 (-30.36%)
Mutual labels:  bus

上海公交API

运行

FLASK_APP=router.py flask run

接口

1. 公交线路查询接口

接口地址

/bus/<router_name>

请求方式:GET

请求参数

名称 位置 类型 必须 说明
router_name url string 公交线路名称,如:1路、2路
direction query string int 公交行驶方向,上行:0(默认),下行:1

返回参数

名称 类型 说明
from string 公交起点站名称
to string 公交终点站名称
start_at string 首班公交发车时间
end_at string 末班公交发车时间
direction int 公交行驶方向,上行:0,下行:1
stops array 公交站点列表
stop_id string 公交站点的数字代号
stop_name string 公交站点名称

2.公交到站信息查询接口

接口地址

/bus/<router_name>/stop/<stop_id>

请求方式:GET

请求参数

名称 位置 类型 必须 说明
router_name url string 公交线路名称,如:1路、2路
stop_id url int 公交站点的数字代号
direction query string int 公交行驶方向,上行:0(默认),下行:1

返回参数

名称 类型 说明
router_name string 公交线路名称
direction int 公交行驶方向,上行:0,下行:1
plate_number string 公交车车牌号
stop_interval int 公交车到达本站的站数
distance int 当前公交车到达本站的距离
time int 当前公交车到达本站的时间(秒)
status string 公交车状态,waiting:等待发车;running:运行中

3.公交线路详情查询接口

接口地址

/bus/<router_name>/details

请求方式:GET

请求参数

名称 位置 类型 必须 说明
router_name url string 公交线路名称,如:1路、2路
direction query string int 公交行驶方向,上行:0(默认),下行:1

返回参数

名称 类型 说明
from string 公交起点站名称
to string 公交终点站名称
start_at string 首班公交发车时间
end_at string 末班公交发车时间
direction int 公交行驶方向,上行:0,下行:1
stops array 公交站点列表
stop_id string 公交站点的数字代号
stop_name string 公交站点名称
plate_number string 公交车车牌号
stop_interval int 公交车到达本站的站数
distance int 当前公交车到达本站的距离
time int 当前公交车到达本站的时间(秒)
status string 公交车状态,waiting:等待发车;running:运行中

错误响应

返回参数

名称 类型 说明
error string 错误代码
error_msg string 错误说明
400 Bad Request
{
  "error": "router_not_exists",
  "error_msg": "不存在该公交线路"
}
404 Not Found
{
  "error": "page_not_found",
  "error_msg": "页面不存在"
}
500 Internal Server Error
{
  "error": "internal_server_error",
  "error_msg": "服务器内部错误"
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].