Skip to content
This repository was archived by the owner on Jan 13, 2020. It is now read-only.
This repository was archived by the owner on Jan 13, 2020. It is now read-only.

rest API request-response 구조 #1

@roharon

Description

@roharon

현 bis API

{
"status": "success",
"bus_array": [
	{
		"bus_number": "7444",
		"name": "bus1",
		"direction": "UP",
		"direction_flow": [
			"UP",
			"UP",
			"UP"
		],
		"bus_stop": 2,
		"distance": "0.7967",
		"time": 1557205961246,
		"to_top": 1588,
		"is_operating": 1,
		"lat": "37.335620",
		"lng": "127.260857",
		"is_stop_now": 0,
		"recent_data_day": 2,
		"recent_data_date": "2019-5-7 14:12:41"
		}
	],
"count": 4855401
}

shuttleN request API

{
    "user_bus_stop": 3
}

shuttleN response API

{
"status": "success",
"bus_array": [
	{
		"bus_number": "7444", #버스 식별번호
		"name": "bus1", #버스 사용자 기준에서의 번호
		"direction": "UP", #상행 하행 구분
		"direction_flow": [
			"UP",
			"UP",
			"UP"
		],
		"bus_stop": 2, # 현재 버스가 있는 정류장
		"distance": "0.7967", #1에 가까울수록 도착에 가까워짐. 
		"time": 1557205961246,
		"to_top": 1588,
		"is_operating": 1, # 운행 여부
		"lat": "37.335620", #위도
		"lng": "127.260857", #경도
		"is_stop_now": 0, #버스 정류장에 정차했는가
		"recent_data_day": 2,
		"recent_data_date": "2019-5-7 14:12:41",
        "left_time": 410 #사용자위치의 정류장까지 예상도착시간 410초.
		}
	],
"count": 4855401 #의미없음
}

예제

{
"status": "success",
"bus_array": [
	{
		"bus_number": "7444",
		"name": "bus1",
		"direction": "UP",
		"direction_flow": [
			"UP",
			"UP",
			"UP"
		],
		"bus_stop": 2,
		"distance": "0.7967",
		"time": 1557205961246,
		"to_top": 1588,
		"is_operating": 1,
		"lat": "37.335620",
		"lng": "127.260857",
		"is_stop_now": 0,
		"recent_data_day": 2,
		"recent_data_date": "2019-5-7 14:12:41"
                "left_time": 410 #사용자위치의 정류장까지 예상도착시간 410초.
},
{
	"bus_number": "7445",
	"name": "bus2",
	"direction": "DOWN",
	"direction_flow": [
		"DOWN",
		"DOWN",
		"DOWN"
	],
	"bus_stop": 5,
	"distance": "0.4718",
	"time": 1557205961966,
	"to_top": 1306,
	"is_operating": 1,
	"lat": "37.336503",
	"lng": "127.263844",
	"is_stop_now": 2,
	"recent_data_day": 2,
	"recent_data_date": "2019-5-7 14:12:41",
        "left_time": 410 #사용자위치의 정류장까지 예상도착시간 410초.
},
{
	"bus_number": "3068",
	"name": "bus3",
	"direction": "DOWN",
	"direction_flow": [
		"DOWN",
		"DOWN",
		"DOWN"
	],
	"bus_stop": 1,
	"distance": "0.0506",
	"time": 1557205961254,
	"to_top": 215,
	"is_operating": 1,
	"lat": "37.339600",
	"lng": "127.275559",
	"is_stop_now": 193,
	"recent_data_day": 2,
	"recent_data_date": "2019-5-7 14:12:41",
    "left_time": 110 #사용자위치의 정류장까지 예상도착시간 110초.
},
{
	"bus_number": "3060",
	"name": "bus4",
	"direction": "",
	"direction_flow": [
		"DOWN",
		"UP",
		"DOWN"
	],
	"bus_stop": 0,
	"distance": 0,
	"time": 0,
	"to_top": 0,
	"is_operating": -1,
	"lat": "37.339394",
	"lng": "127.276002",
	"is_stop_now": 0,
	"recent_data_day": 2,
	"recent_data_date": "2019-5-7 14:07:32",
    "left_time": 700 #사용자위치의 정류장까지 예상도착시간 700초.
	}
],
"count": 4855401
}

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions