Contents

handle(getRestaurantGuest:completion:)

Handles returning the information about the user making the reservation.

Declaration

func handle(getRestaurantGuest intent: INGetRestaurantGuestIntent, completion: @escaping  @Sendable (INGetRestaurantGuestIntentResponse) -> Void)
func handle(getRestaurantGuest intent: INGetRestaurantGuestIntent) async -> INGetRestaurantGuestIntentResponse

Parameters

  • intent:

    The intent object containing details about the request. The information in this object has already been confirmed.

  • completion:

    The handler block to execute with your response. You must execute this handler at some point during your implementation of this method. This handler has no return value and takes the following parameter:

    response

    The Ingetrestaurantguestintentresponse object you create to report the status of the request. This parameter must not be nil.

Discussion

In your implementation of this method, you should create an INRestaurantGuest object containing the current user’s information and assign it to your response object. You should also create an INRestaurantGuestDisplayPreferences object and specify the options for displaying the user’s information. When done, execute the provided block with your response object.