Empower¶
Overview¶
The Empower class allows you to interact with the Empower API. Documentation for the Empower API can be found in their GitHub repo.
The Empower API only has a single endpoint to access all account data. As such, it has a very high overhead. This connector employs caching in order to allow the user to specify the tables to extract without additional API calls. You can disable caching as an argument when instantiating the class.
Authentication
You must request a secret token from Empower.
Quickstart¶
To instantiate the Empower class, you can either store your EMPOWER_API_KEY as an environment
variables or pass it in as an argument:
from parsons import Empower
empower = Empower()
from parsons import Empower
empower = Empower(api_key='MY_API_KEY')
You can then call class methods:
tbl = empower.get_profiles()
API¶
- class parsons.empower.empower.Empower(api_key=None, empower_uri=None, cache=True)[source]¶
Instantiate class.
- Parameters:
api_key – str The Empower provided API key.The Empower provided Client UUID. Not required if
EMPOWER_API_KEYenv variable set.empower_uri – str The URI to access the Empower API. The default is currently set to https://api.getempower.com/v1/export. You can set an
EMPOWER_URIenv variable or use this URI parameter if a different endpoint is necessary.cache – boolean The Empower API returns all account data after each call. Setting cache to
Truestores the blob and then extracts Parsons tables for each method. Setting cache toFalsewill download all account data for each method call.
- get_profiles_active_ctas()[source]¶
Get active ctas assigned to Empower profiles.
- Returns:
- Table
See Table for output options.
- get_cta_results()[source]¶
Get Empower call to action results.
- Returns:
- Table
See Table for output options.
- get_cta_prompts()[source]¶
Get Empower calls to action prompts.
- Returns:
- Table
See Table for output options.
- get_cta_prompt_answers()[source]¶
Get Empower calls to action prompt answers.
- Returns:
- Table
See Table for output options.
- get_cta_regions()[source]¶
Get a list of regions that each call to active is active in.
- Returns:
- Table
See Table for output options.
Get a list of shareables associated with calls to action.
- Returns:
- Table
See Table for output options.