Wait for Event
POST /v1/events/{event_name}/wait — waitForEvent
import { client, Events } from 'anchorbrowser';
// ANCHORBROWSER_API_KEY is read from the environment by default;
// set it explicitly like this:
client.setConfig({ auth: () => 'your-api-key' });
const result = await Events.waitForEvent({
path: {
event_name: 'your-event-name'
}
});
console.log(result);
from anchorbrowser import Anchorbrowser
# ANCHORBROWSER_API_KEY is read from the environment by default;
# set it explicitly with Anchorbrowser(api_key="your-api-key")
client = Anchorbrowser()
result = client.events.wait_for_event(
"your-event-name",
)
print(result)
Signal Event
POST /v1/events/{event_name} — signalEvent
import { client, Events } from 'anchorbrowser';
// ANCHORBROWSER_API_KEY is read from the environment by default;
// set it explicitly like this:
client.setConfig({ auth: () => 'your-api-key' });
const result = await Events.signalEvent({
path: {
event_name: 'your-event-name'
},
body: {
data: {
message: 'Task completed',
result: 'success',
timestamp: '2024-01-01T12:00:00Z'
}
}
});
console.log(result);
from anchorbrowser import Anchorbrowser
# ANCHORBROWSER_API_KEY is read from the environment by default;
# set it explicitly with Anchorbrowser(api_key="your-api-key")
client = Anchorbrowser()
result = client.events.signal_event(
"your-event-name",
data={
"message": "Task completed",
"result": "success",
"timestamp": "2024-01-01T12:00:00Z"
},
)
print(result)

