更新 City_API_V2
parent
6ce14a65c5
commit
8d0f3b1276
|
@ -1 +1,75 @@
|
||||||
歡迎使用 Wiki!
|
# 雲科大大門口資料串接API
|
||||||
|
## 獲取資料
|
||||||
|
### 身分驗證
|
||||||
|
```
|
||||||
|
URL : http://140.125.20.183:7700/Users/authenticate
|
||||||
|
Method : POST
|
||||||
|
Content-Type: application/json
|
||||||
|
data:{ "username": "yuntech",
|
||||||
|
"password": "yuntech"}
|
||||||
|
```
|
||||||
|
回傳:
|
||||||
|
```
|
||||||
|
{
|
||||||
|
"id": 2,
|
||||||
|
"firstName": "root",
|
||||||
|
"lastName": "manager",
|
||||||
|
"username": "yuntech",
|
||||||
|
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjIiLCJuYmYiOjE3MTU1NzkwMzIsImV4cCI6MTcxNjE4MzgzMiwiaWF0IjoxNzE1NTc5MDMyfQ.83ipsy0s456_puo_alpAAVtav2hed8UC2fR-yFXZteQ"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
將獲得的token存放,之後呼叫API都需要攜帶, 每7天過期一次,記得重新獲取token
|
||||||
|
|
||||||
|
### 新增進入大門口的車輛資料
|
||||||
|
```
|
||||||
|
URL : http://140.125.20.183:7700/api/Yuntech_in_car_table/city_parking_in_car_data
|
||||||
|
Method : POST
|
||||||
|
Content-Type: application/json
|
||||||
|
data:{ "license_plate_number": "string",
|
||||||
|
"car_img": "string",
|
||||||
|
"location": "string"}
|
||||||
|
```
|
||||||
|
因為都是串即時的資料,時間會根據上傳進行觸發,因此內容不需包含時間
|
||||||
|
|
||||||
|
| 欄位名稱 | 型態 | 說明 |
|
||||||
|
| -------- | -------- | -------- |
|
||||||
|
| license_plate_number | string | 車牌號碼 |
|
||||||
|
| car_img | string | 無須填入 |
|
||||||
|
| location | string | 進入位置 |
|
||||||
|
|
||||||
|
如以下操作
|
||||||
|
|
||||||
|
![](http://140.125.21.65:8418/Education/Python/raw/branch/master/pyqt5/img/%E5%9C%96%E7%89%873_1%20%281%29.png)
|
||||||
|
|
||||||
|
輸出結果
|
||||||
|
|
||||||
|
![](http://140.125.21.65:8418/Education/Python/raw/branch/master/pyqt5/img/%E5%9C%96%E7%89%871_1%20%282%29.png)
|
||||||
|
|
||||||
|
### 新增出去大門口的車輛資料
|
||||||
|
出去車輛會根據資料庫內部比對車牌的進入名單的最新一筆進行匹配,上傳即可直接找到相關資料,並將時間一併帶入
|
||||||
|
```
|
||||||
|
URL : http://140.125.20.183:7700/api/Yuntech_in_car_table/city_parking_out_car_data
|
||||||
|
Method : POST
|
||||||
|
Content-Type: application/json
|
||||||
|
data:{ "license_plate_number": "string",
|
||||||
|
"car_img": "string",
|
||||||
|
"location": "string"}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
| 欄位名稱 | 型態 | 說明 |
|
||||||
|
| -------- | -------- | -------- |
|
||||||
|
| license_plate_number | string | 車牌號碼 |
|
||||||
|
| car_img | string | 無須填入 |
|
||||||
|
| location | string | 出去位置 |
|
||||||
|
|
||||||
|
如以下操作
|
||||||
|
|
||||||
|
![](http://140.125.21.65:8418/Education/Python/raw/branch/master/pyqt5/img/%E5%9C%96%E7%89%871_1%20%281%29.png)
|
||||||
|
|
||||||
|
|
||||||
|
輸出結果
|
||||||
|
![](http://140.125.21.65:8418/Education/Python/raw/branch/master/pyqt5/img/%E5%9C%96%E7%89%873_1%20%282%29.png)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user