POST api/bus/getstations

根据公交线路id查询公交站点

默认返回json数据,若要返回xml格式数据在访问地址后加上xml=true

Request 信息

URI 参数

None.

Body 参数

BusStationModel
名称说明数据类型附加信息
LineId

线路id

integer

Required

Direction

上行或下行

BusDirect

None.

IsWithCoord

是否返回坐标线

boolean

None.

City

城市

string

Required

Token

token

string

Required

Platform

string

None.

Request 数据格式

application/json, text/json

示例:
{
  "LineId": 1,
  "Direction": 0,
  "IsWithCoord": true,
  "City": "sample string 3",
  "Token": "sample string 4",
  "Platform": "sample string 5"
}

application/xml, text/xml

示例:
<BusStationModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/API.Models.API.Bus">
  <Platform xmlns="http://schemas.datacontract.org/2004/07/API.Models.API">sample string 5</Platform>
  <Token xmlns="http://schemas.datacontract.org/2004/07/API.Models.API">sample string 4</Token>
  <City xmlns="http://schemas.datacontract.org/2004/07/API.Models.API">sample string 3</City>
  <Direction>Both</Direction>
  <IsWithCoord>true</IsWithCoord>
  <LineId>1</LineId>
</BusStationModel>

application/x-www-form-urlencoded

示例:

Response 信息

输出返回说明

BusStationResult
名称说明数据类型附加信息
BusStations

公交站点

Collection of BusStation

None.

ErrorCode

API错误码

APIErrorCode

None.

Msg

附带消息

string

None.

Response 返回数据格式

application/json, text/json

示例:
{
  "BusStations": [
    {
      "Direction": 0,
      "Id": 1,
      "Name": "sample string 2",
      "Coords": [
        {
          "Lat": 1.0,
          "Lng": 2.0
        },
        {
          "Lat": 1.0,
          "Lng": 2.0
        }
      ],
      "Stations": [
        {
          "Coord": {
            "Lat": 1.0,
            "Lng": 2.0
          },
          "Id": 1,
          "Index": 2,
          "Name": "sample string 3"
        },
        {
          "Coord": {
            "Lat": 1.0,
            "Lng": 2.0
          },
          "Id": 1,
          "Index": 2,
          "Name": "sample string 3"
        }
      ]
    },
    {
      "Direction": 0,
      "Id": 1,
      "Name": "sample string 2",
      "Coords": [
        {
          "Lat": 1.0,
          "Lng": 2.0
        },
        {
          "Lat": 1.0,
          "Lng": 2.0
        }
      ],
      "Stations": [
        {
          "Coord": {
            "Lat": 1.0,
            "Lng": 2.0
          },
          "Id": 1,
          "Index": 2,
          "Name": "sample string 3"
        },
        {
          "Coord": {
            "Lat": 1.0,
            "Lng": 2.0
          },
          "Id": 1,
          "Index": 2,
          "Name": "sample string 3"
        }
      ]
    }
  ],
  "ErrorCode": 0,
  "Msg": "sample string 1"
}

application/xml, text/xml

示例:
<BusStationResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/API.Models.API.Bus">
  <ErrorCode xmlns="http://schemas.datacontract.org/2004/07/API.Models.API">SUCCESS</ErrorCode>
  <Msg xmlns="http://schemas.datacontract.org/2004/07/API.Models.API">sample string 1</Msg>
  <BusStations>
    <BusStationResult.BusStation>
      <Coords xmlns:d4p1="http://schemas.datacontract.org/2004/07/API.Models.API">
        <d4p1:GisPosition>
          <d4p1:Lat>1</d4p1:Lat>
          <d4p1:Lng>2</d4p1:Lng>
        </d4p1:GisPosition>
        <d4p1:GisPosition>
          <d4p1:Lat>1</d4p1:Lat>
          <d4p1:Lng>2</d4p1:Lng>
        </d4p1:GisPosition>
      </Coords>
      <Direction>Both</Direction>
      <Id>1</Id>
      <Name>sample string 2</Name>
      <Stations>
        <BusStationResult.Station>
          <Coord xmlns:d6p1="http://schemas.datacontract.org/2004/07/API.Models.API">
            <d6p1:Lat>1</d6p1:Lat>
            <d6p1:Lng>2</d6p1:Lng>
          </Coord>
          <Id>1</Id>
          <Index>2</Index>
          <Name>sample string 3</Name>
        </BusStationResult.Station>
        <BusStationResult.Station>
          <Coord xmlns:d6p1="http://schemas.datacontract.org/2004/07/API.Models.API">
            <d6p1:Lat>1</d6p1:Lat>
            <d6p1:Lng>2</d6p1:Lng>
          </Coord>
          <Id>1</Id>
          <Index>2</Index>
          <Name>sample string 3</Name>
        </BusStationResult.Station>
      </Stations>
    </BusStationResult.BusStation>
    <BusStationResult.BusStation>
      <Coords xmlns:d4p1="http://schemas.datacontract.org/2004/07/API.Models.API">
        <d4p1:GisPosition>
          <d4p1:Lat>1</d4p1:Lat>
          <d4p1:Lng>2</d4p1:Lng>
        </d4p1:GisPosition>
        <d4p1:GisPosition>
          <d4p1:Lat>1</d4p1:Lat>
          <d4p1:Lng>2</d4p1:Lng>
        </d4p1:GisPosition>
      </Coords>
      <Direction>Both</Direction>
      <Id>1</Id>
      <Name>sample string 2</Name>
      <Stations>
        <BusStationResult.Station>
          <Coord xmlns:d6p1="http://schemas.datacontract.org/2004/07/API.Models.API">
            <d6p1:Lat>1</d6p1:Lat>
            <d6p1:Lng>2</d6p1:Lng>
          </Coord>
          <Id>1</Id>
          <Index>2</Index>
          <Name>sample string 3</Name>
        </BusStationResult.Station>
        <BusStationResult.Station>
          <Coord xmlns:d6p1="http://schemas.datacontract.org/2004/07/API.Models.API">
            <d6p1:Lat>1</d6p1:Lat>
            <d6p1:Lng>2</d6p1:Lng>
          </Coord>
          <Id>1</Id>
          <Index>2</Index>
          <Name>sample string 3</Name>
        </BusStationResult.Station>
      </Stations>
    </BusStationResult.BusStation>
  </BusStations>
</BusStationResult>