Skip to content

VOE Subscribers API

VOE Subscribers API

Bases: API

CHIME/FRB VOEvent Subscriber API.

__init__

Python
__init__(API)

Initialize the CHIME/FRB VOEvent Subscriber API.

add

Python
add(payload, is_update=False, wait=10.0)

Add a subscriber to the CHIME/FRB VOEvent Service.

Add a subscriber to the CHIME/FRB VOEvent Service by supplying the required details. Subscribers are indexed by their unique email address.

Parameters:

Name Type Description Default
payload dict

The required subscriber details as a dictionary.

required

Returns:

Name Type Description
dict

The database response dictionary.

fetch

Python
fetch(email_address=None)

Fetch a subscriber to the CHIME/FRB VOEvent Service.

Retrieve a subscriber to the CHIME/FRB VOEvent service by their unique address.

Parameters:

Name Type Description Default
email_address Optional[str]

The email address of the subscriber.

None

Returns:

Name Type Description
dict

The subscriber object in the CHIME/FRB VOEvent. Subscribers database that matches the inputted ID.

get_all

Python
get_all()

Retrieve all subscribers to the CHIME/FRB VOEvent Service.

Retrieve all subscribers to the CHIME/FRB VOEvent service that are currently saved in the "voe_subscribers" RethinkDB table in FRB Master.

Returns:

Type Description

List of dictionaries

remove

Python
remove(email_address=None)

Remove a subscriber from the CHIME/FRB VOEvent Service.

Remove a subscriber to the CHIME/FRB VOEvent Service manually by suppyling both the subscriber ID and the name of that subscriber. In an effort to prevent mistaken removals, the name of the subscriber must match the ID else this process fails.

Parameters:

Name Type Description Default
email_address Optional[str]

The unique email address that the subscriber will be contacted by regarding VOEvents and all service updates.

None

Returns:

Name Type Description
dict

The response from the CHIME/FRB VOEvent Subscriber database regarding deletion of the subscriber.