GetWaitlistEntry 方法

這個方法會根據提供的等候名單項目 ID,傳回使用者的等候名單項目。動作中心會定期呼叫此方法,以取得使用者候補名單項目的最新狀態。等候名單項目應可在建立時間起算的 30 天內擷取。

要求

GetWaitlistEntryRequest

傳回值

GetWaitlistEntryResponse

// Get the waitlist entry corresponding to the provided waitlist entry ID.
message GetWaitlistEntryRequest {
  option features.(pb.java).nest_in_file_class = YES;

  // Required. The partner-provided waitlist entry ID to request info for.
  string waitlist_entry_id = 1;
}

// Response with the waitlist entry corresponding to the provided
// waitlist entry ID.
message GetWaitlistEntryResponse {
  option features.(pb.java).nest_in_file_class = YES;

  // Required. The partner-provided information about a user’s waitlist entry.
  WaitlistEntry waitlist_entry = 1;
}

GetWaitlistEntry 範例

取得要求

{ "waitlist_entry_id": "MYS-1668739060" }

取得回覆

{
  "waitlist_entry": {
    "wait_estimate": {
      "party_size": 3,
      "wait_length": { "parties_ahead_count": 3 }
    },
    "waitlist_entry_state": "WAITING",
    "waitlist_entry_state_times": { "created_time_seconds": 1234567890 }
  }
}