ListBookings 方法
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
请求
ListBookingsRequest
返回值
ListBookingsResponse
该方法只需返回用户的未来预订,而非所有时间的预订。
规范的 gRPC 错误代码
NOT_FOUND
(如果合作伙伴找不到请求中的用户 ID)
// Request to list all upcoming bookings for a user
message ListBookingsRequest {
// ID of the user (required)
string user_id = 1;
}
// Response for the [ext.maps.booking.partner.v2.ListBookings] RPC with all
// upcoming bookings for the requested user
message ListBookingsResponse {
// All bookings of the user (required)
repeated Booking bookings = 1;
}
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003eThe \u003ccode\u003eListBookings\u003c/code\u003e RPC retrieves upcoming bookings for a specific user.\u003c/p\u003e\n"],["\u003cp\u003eRequests must include the user's ID and will return a \u003ccode\u003eNOT_FOUND\u003c/code\u003e error if the ID is unknown.\u003c/p\u003e\n"],["\u003cp\u003eThe response contains a list of \u003ccode\u003eBooking\u003c/code\u003e objects representing the user's future bookings.\u003c/p\u003e\n"]]],["The `ListBookingsRequest` requires a `user_id` to retrieve a user's future bookings. The `ListBookingsResponse` returns a list of `bookings` for the specified user. The system should only return future bookings, not historical ones. If the provided `user_id` is not found, the service will respond with a `NOT_FOUND` gRPC error code. The request is made through the `ListBookings` RPC.\n"],null,["# ListBookings method\n\n**Request**\n\nListBookingsRequest\n\n**Return value**\n\nListBookingsResponse\n\nThis only needs to return future bookings for a user, not bookings for all time.\n\n**Canonical gRPC error codes**\n\n- `NOT_FOUND` (if the requested user ID is unknown to the partner)\n\n```scilab\n// Request to list all upcoming bookings for a user\nmessage ListBookingsRequest {\n // ID of the user (required)\n string user_id = 1;\n}\n\n// Response for the [ext.maps.booking.partner.v2.ListBookings] RPC with all\n// upcoming bookings for the requested user\nmessage ListBookingsResponse {\n // All bookings of the user (required)\n repeated Booking bookings = 1;\n}\n```"]]