Connections
Retrieving connection objects
- class ConnectionMixin
This class defines all functions related to
BlueConic connections
.- get_connection(connection_id)
Gets the connection with the connection ID and returns it as a
BlueConic connection
.- Parameters
connection_id (str) – The connection ID of the connection
- Raises
HTTPError
: Request fails- Returns
The requested connection
- Return type
- Usage:
>>> import blueconic >>> bc = blueconic.Client() >>> bc.get_connection('test-connection-id') <blueconic.domain.connection.Connection >
- get_connections(start=0, count=10000000)
Gets all connections and returns them in a generator with all
BlueConic connections
.- Parameters
- Returns
Iterator with Connection
- Return type
Iterator[Connection]
- Usage:
>>> import blueconic >>> bc = blueconic.Client() >>> connections = bc.get_connections(start=3, count=5) >>> for connection in connections: >>> print(connection.name) Content Collector for support.blueconic.com Content Collector for www.blueconic.com Facebook Custom Audiences Firehose Kinesis Google Tag Manager
Using connection objects
- class Connection
- get_store()
Gets the product/content store of this connection.
- Returns
The Store or None
- Return type
Optional[Store]
- Usage:
>>> import blueconic >>> bc = blueconic.Client() >>> connection_id = bc.get_blueconic_parameter_value("My connection","connection") >>> connection = bc.get_connection(connection_id) >>> store = connection.get_store()
- property id
- Returns
ID of this object.
- Return type
- 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.