Code Monkey home page Code Monkey logo

rtbus's Introduction

实时公交

Document

附近线路

PATH

GET /api/v3/station-buses/bylocation/:location

RESPONSE

[{
  "sn": "公交站",
  "lc": 5,
  "slc": 1,
  "l":"23.001,113.002",
  "lines": [{
      "no": "25",
      "dir": "0",
      "adir": "1",
      "ssn": "起始站",
      "esn":"终点站",
      "nsn":"下一站",
      "o": 12,
      "buses":[{
        "o": 10,
        "s": 0.5,
        "l": "23.001,113.002",
        "d": 34
      },{
        "o": 10,
        "s": 1,
        "l": "23.001,113.002",
        "d": 34
      },{
        "o": 11,
        "s": 0.5,
        "l": "23.001,113.002",
        "d": 34
      }]
  }]
}]

公交站线路

PATH

GET /api/v3/station-buses/byline/:city/:sn

RESPONSE

附近线路返回结果

线路信息

PATH

GET /api/v3/lines/:city/:line/:dir

Parameter

字段 类型 说明
bus bool 是否带有实时公交信息,默认为 true

响应结果

{
  "no": "25",
  "id": "xxxxxx",
  "adir": "1",
  "dir": "0",
  "ssn": "起始站",
  "esn": "终点站",
  "price": "1元",
  "ftime": "06:20",
  "ltime": "22:30",
  "ss":[{
    "o": 1,
    "sn":"起始站",
    "l": "36.20105,120.5255"
  },{
    "o": 2,
    "sn":"站点1",
    "l": "36.20105,120.5255"
  }],
  "buses": [{
    "o": 10,
    "s": 0.5,
    "l": "23.001,113.002",
    "d": 34
 }]
}

线路搜索

PATH

GET /api/v3/search/:city/:keyword

响应结果

[{
  "no": "25",
  "id": "xxxxxx",
  "adir": "1",
  "dir": "0",
  "ssn": "起始站",
  "esn": "终点站",
  "price": "1元",
  "ftime": "06:20",
  "ltime": "22:30",
  "ss":[{
    "o": 1,
    "sn":"起始站",
    "l": "36.20105,120.5255"
  },{
    "o": 2,
    "sn":"站点1",
    "l": "36.20105,120.5255"
  }],
  "buses": [{
    "o": 10,
    "s": 0.5,
    "l": "23.001,113.002",
    "d": 34
 }]
}]

线路运行公交

PATH

GET /api/v3/lines/:city/:line/:dir/buses

Parameter

字段 类型 说明
order string 公交站

RESPONSE

[{
  "o": 10,
  "s": 0.5,
  "l": "23.001,113.002",
  "d": 34
},{
  "o": 10,
  "s": 0.5,
  "l": "23.001,113.002",
  "d": 34
}]

rtbus's People

Contributors

pkgplus avatar haierinterx avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.