Listeners

Retrieving listener objects

class ListenerMixin

This class defines all functions related to BlueConic listeners.

get_listener(listener_id)

Gets the listener with the listener ID and returns it as a BlueConic listeners.

Parameters:

listener_id (str) – The ID of the desired listener

Raises:

HTTPError: Request fails

Returns:

A listener object

Return type:

Listener

Usage:
>>> import blueconic
>>> bc = blueconic.Client()
>>> bc.get_listener('example-listener-id')
<blueconic.domain.listener.Listener>
get_listeners(start=0, count=10000000)

Gets all listeners and returns them in a generator with all BlueConic listeners.

Parameters:
  • start (int, optional) – The listener to start from. Defaults to 0.

  • count (int, optional) – The number of listeners to retrieve. Defaults to 10000000.

Returns:

Iterator with Listener

Return type:

Iterator[Listener]

Usage:
>>> import blueconic
>>> bc = blueconic.Client()
>>> bc.get_listeners()
<generator object Listener.get_listeners>

Using listener objects

class Listener
property creation_date
Returns:

The creation date of this object.

Return type:

Optional[datetime]

property creator_username
Returns:

The username that created this object.

Return type:

Optional[str]

property description
Returns:

Description of this object.

Return type:

Optional[str]

property id
Returns:

ID of this object.

Return type:

str

property is_active
Returns:

Returns indication if the object is active

Return type:

Optional[bool]

property labels
Returns:

The labels this object.

Return type:

Optional[Sequence[str]

property last_modified_date
Returns:

The last modified date of this object.

Return type:

Optional[datetime]

property last_modified_username
Returns:

The last modified username of this object.

Return type:

Optional[str]

property name
Returns:

Name of this object.

Return type:

Optional[str]

property parameters

Returns the parameters of this object.

property plugin_id

Returns the plugin definition of this object.