-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* bump version to 0.14.0 Also, this commit cleans up a few stray `print` calls. * add Targets to VAN docs
- Loading branch information
Eliot Stone
authored
Jun 18, 2020
1 parent
42977e6
commit 89c9049
Showing
4 changed files
with
24 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
VAN | ||
========== | ||
|
||
|
||
******** | ||
Overview | ||
******** | ||
|
||
The VAN module leverages the VAN API and generally follows the naming convention of their API endpoints. It | ||
The VAN module leverages the VAN API and generally follows the naming convention of their API endpoints. It | ||
is recommended that you reference their `API documentation <https://developers.ngpvan.com/van-api#van>`_ to | ||
additional details and information. | ||
|
||
.. note:: | ||
.. note:: | ||
API Keys | ||
- VAN API Keys are required to use this module. | ||
- API Keys are specific to each committee and state, so you might need many. | ||
- Not all API Keys are provisioned for all end points. You should contact VAN if you need access. | ||
- VAN typically offers a cap of free API calls per day. API calls which exceed the free limit | ||
incurr a cost. | ||
|
||
.. warning:: | ||
.. warning:: | ||
VANIDs | ||
VANIDs are unique to each state and instance of the VAN. VANIDs used for the AV VAN **will not** match | ||
those of the SmartVAN. | ||
|
@@ -69,7 +69,7 @@ Score: Loading and Updating | |
=========================== | ||
|
||
Loading a score a multi-step process. Once a score is set to approved, loading takes place | ||
overnight. | ||
overnight. | ||
|
||
.. code-block:: python | ||
|
@@ -91,7 +91,7 @@ overnight. | |
'vanid', | ||
'VANID', | ||
score_slot_id, | ||
'myscore', | ||
'myscore', | ||
email='[email protected]') | ||
|
@@ -105,7 +105,7 @@ overnight. | |
=========================== | ||
People: Add Survey Response | ||
=========================== | ||
The following workflow can be used to apply survey questions, activist codes | ||
The following workflow can be used to apply survey questions, activist codes | ||
and canvass reponses. | ||
|
||
.. code-block:: python | ||
|
@@ -115,7 +115,7 @@ and canvass reponses. | |
# Instatiate Class | ||
van = VAN(db="MyVoters") | ||
sq_id = 311838 # Valid survey question id | ||
sq_id = 311838 # Valid survey question id | ||
sr = 1288926 # Valid survey response id | ||
ct = 36 # Valid contact type id | ||
it_id = 4 # Valid input type id | ||
|
@@ -139,7 +139,7 @@ Events are made up of sub objects that need to exist to create an event | |
in the VAN UI and can be reused for multiple events. | ||
* Locations - An event can have multiple locations. While not required to initially create an | ||
event, these are required to add signups to an event. | ||
* Roles - The various roles that a person can have at an event, such as ``Lead`` or | ||
* Roles - The various roles that a person can have at an event, such as ``Lead`` or | ||
``Canvasser``. These are set as part of the event type. | ||
* Shifts - Each event can have multiple shits in which a person can be assigned. These are | ||
specified in the event creation. | ||
|
@@ -153,7 +153,7 @@ Events are made up of sub objects that need to exist to create an event | |
# Create A Location | ||
loc_id = van.location(name='Big `Ol Canvass', address='100 W Washington', city='Chicago', state='IL') | ||
# Create Event | ||
name = 'GOTV Canvass' # Name of event | ||
short_name = 'GOTVCan' # Short name of event, 12 chars or less | ||
|
@@ -163,11 +163,11 @@ Events are made up of sub objects that need to exist to create an event | |
roles = [259236] # A list of valid role ids | ||
location_ids = [loc_id] # An optional list of locations ids for the event | ||
description = 'CPD Super Volunteers Canvass' # Optional description of 200 chars or less | ||
shifts = [{'name': 'Shift 1', | ||
'start_time': '2018-11-01T15:00:00', | ||
shifts = [{'name': 'Shift 1', | ||
'start_time': '2018-11-01T15:00:00', | ||
'end_time': '2018-11-11T17:00:00'}] # Shifts must fall within event start/end time. | ||
new_event = van.event_create(name, short_name, start_time, end_time, event_type_id, roles, | ||
new_event = van.event_create(name, short_name, start_time, end_time, event_type_id, roles, | ||
location_ids=location_ids, shifts=shifts, description=description) | ||
|
@@ -251,7 +251,7 @@ Canvass Responses | |
*********** | ||
Saved Lists | ||
*********** | ||
.. note:: | ||
.. note:: | ||
A saved list must be shared with the user associated with your API key to | ||
be listed. | ||
|
@@ -261,7 +261,7 @@ Saved Lists | |
******* | ||
Folders | ||
******* | ||
.. note:: | ||
.. note:: | ||
A folder must be shared with the user associated with your API key to | ||
be listed. | ||
|
@@ -280,11 +280,11 @@ Scores | |
Prior to loading a score for the first time, you must contact VAN support to request | ||
a score slot. | ||
.. note:: | ||
.. note:: | ||
Score Auto Approval | ||
Scores can be automatically set to ``approved`` through the file_load function allowing | ||
you to skip calling the :meth:`file_load` function. To automatically approve scores, | ||
if the average of the scores is within the fault tolerance specified by the user.It | ||
if the average of the scores is within the fault tolerance specified by the user.It | ||
is only available to API keys with permission to automatically approve scores. | ||
|
@@ -297,6 +297,12 @@ Score Updates | |
.. autoclass:: parsons.ngpvan.van.ScoreUpdates | ||
:inherited-members: | ||
******* | ||
Targets | ||
******* | ||
.. autoclass:: parsons.ngpvan.van.Targets | ||
:inherited-members: | ||
***************** | ||
File Loading Jobs | ||
***************** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ def main(): | |
|
||
setup( | ||
name="parsons", | ||
version='0.13.1', | ||
version='0.14.0', | ||
author="The Movement Cooperative", | ||
author_email="[email protected]", | ||
url='https://github.com/movementcoop/parsons', | ||
|