Search...
findEvent( )
Finds an event by ID or URL slug.
Description
Unlike the getEvent
function, which returns a "not found" error, findEvent()
returns an empty response when an event is not found.
Syntax
function findEvent(options: FindEventOptions): Promise<FindEventResponse>
findEvent Parameters
NAME
TYPE
DESCRIPTION
options
Optional
FindEventOptions
Optional fields.
Returns
Return Type:
Promise<
FindEventResponse
>NAME
TYPE
DESCRIPTION
event
V3Event
Event.
Was this helpful?
findEvent example
Copy Code
1import { wixEventsV2 } from 'wix-events.v2';23 async function findEvent(options) {4 try {5 const result = await wixEventsV2.findEvent(options);67 return result;8 } catch (error) {9 console.error(error);10 // Handle the error11 }12 }13