2016-12-20 99 views
1

爲什麼在示例中,乘客有空的rider_id?但說明中另有說明? riders[].rider_id:哈希車手uuid。它沒有說任何關於它可能是空的。否則,返回它有什麼意義。 GET requestGET請求端點結果rider_id爲空

或僅僅是一個例子,和實際的響應具有所有這些編號不爲空

{ 
    "product_id": "17cb78a7-b672-4d34-a288-a6c6e44d5315", 
    "request_id": "a1111c8c-c720-46c3-8534-2fcdd730040d", 
    "status": "accepted", 
    "surge_multiplier": 1.0, 
    "shared": true, 
    "driver": { 
    "phone_number": "(555)555-5555", 
    "sms_number": "(555)555-5555", 
    "rating": 5, 
    "picture_url": "https:\/\/d1w2poirtb3as9.cloudfront.net\/img.jpeg", 
    "name": "Bob" 
    }, 
    "vehicle": { 
    "make": "Bugatti", 
    "model": "Veyron", 
    "license_plate": "I<3Uber", 
    "picture_url": "https:\/\/d1w2poirtb3as9.cloudfront.net\/car.jpeg" 
    }, 
    "location": { 
    "latitude": 37.3382129093, 
    "longitude": -121.8863287568, 
    "bearing": 328 
    }, 
    "pickup": { 
    "latitude": 37.3303463, 
    "longitude": -121.8890484, 
    "eta": 5 
    }, 
    "destination": { 
    "latitude": 37.6213129, 
    "longitude": -122.3789554, 
    "eta": 19 
    }, 
    "waypoints": [ 
    { 
     "rider_id":null, 
     "latitude":37.77508531, 
     "type":"pickup", 
     "longitude":-122.3976683872 
    }, 
    { 
     "rider_id":null, 
     "latitude":37.773133, 
     "type":"dropoff", 
     "longitude":-122.415069 
    }, 
    { 
     "rider_id":"8KwsIO_YG6Y2jijSMf", 
     "latitude":37.7752423, 
     "type":"dropoff", 
     "longitude":-122.4175658 
    } 
    ], 
    "riders": [ 
    { 
     "rider_id":"8KwsIO_YG6Y2jijSMf", 
     "first_name":"Alec", 
     "me": true 
    }, 
    { 
     "rider_id":null, 
     "first_name":"Kevin", 
     "me": false 
    } 
    ] 
} 

回答

2

riders陣列,如在GET /request/{request_id}參考頁指定,則僅返回共享的遊樂設施(uberPOOL乘坐)。如果該騎手帳戶已通過開發者應用程序的驗證,您將只能獲得非空rider_id

這意味着,如果riders陣列中的任何rider_idnull,條件是相關聯的rider_id騎車人的帳戶並未與您的應用進行認證。