Controlshift
Overview
Controlshift is a platform for creating campaigns with distributed events, local groups, and member-led petitions. This connector allows you to interact with select functions of the the Controlshift Authenticated REST API .
Note
- Authentication
An API Application Integration is required to instantiate the
Controlshift
class. Details on how to create the integration and acquire credentials can be found on the Controlshift website.
Quickstart
To instantiate the Controlshift class, you can either store your credentials as environment
variables (CONTROLSHIFT_HOSTNAME
, CONTROLSHIFT_CLIENT_ID
, and CONTROLSHIFT_CLIENT_SECRET
) or pass them in as arguments:
from parsons import Controlshift
# First approach: Use API credentials via environmental variables
cs = Controlshift()
# Second approach: Pass API credentials as arguments
cs = Controlshift(hostname='my_hostname', client_id='my_client_id', client_secret='my_client_secret')
# Get all petitions
cs.get_petitions()
Controlshift Class
- class parsons.Controlshift(hostname=None, client_id=None, client_secret=None)[source]
Instantiate the Controlshift class. Requires an API Application integration. For more info on setup, see: https://developers.controlshiftlabs.com/#authenticated-rest-api-quickstart-guide
- Args:
- hostname: str
The URL for the homepage/login page of the organization’s Controlshift instance (e.g. https://demo.controlshift.app). Not required if
CONTROLSHIFT_HOSTNAME
env variable is set.- client_id: str
The Client ID for your REST API Application. Not required if
CONTROLSHIFT_CLIENT_ID
env variable is set.- client_secret: str
The Client Secret for your REST API Application. Not required if
CONTROLSHIFT_CLIENT_SECRET
env variable is set.
- Returns:
Controlshift Class