-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into empower_connector
- Loading branch information
Showing
12 changed files
with
906 additions
and
17 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 |
---|---|---|
|
@@ -206,6 +206,7 @@ Indices and tables | |
hustle | ||
mailchimp | ||
mobilecommons | ||
mobilize_america | ||
nation_builder | ||
newmode | ||
|
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 |
---|---|---|
@@ -0,0 +1,49 @@ | ||
MobileCommons | ||
========== | ||
|
||
******** | ||
Overview | ||
******** | ||
|
||
`MobileCommons <https://secure.mcommons.com/>`_ is a broadcast text messaging tool that helps orgranizations | ||
mobilize supporters and fundraise by building opt-ed in audiences. You can read more about the product | ||
`here <https://uplandsoftware.com/mobile-messaging/>`_. | ||
|
||
*********** | ||
Quick Start | ||
*********** | ||
|
||
To instantiate a class you must pass the username and password of a MobileCommons account as an argument | ||
or store the username and password into environmental variables called ``MOBILECOMMONS_USERNAME`` and | ||
``MOBILECOMMONS_PASSWORD``, respectively. If you MobileCommons account has access to various MobileCommons | ||
companies (i.e. organizations), you'll need to specify which MobileCommons company you'd like to interact | ||
with by specifying the Company ID in the ``company_id`` parameter. To find the Company ID, navigate to the | ||
`Company and Users page <https://secure.mcommons.com/companies/>`_. | ||
|
||
.. code-block:: python | ||
from parsons import MobileCommons | ||
# Pass credentials via environmental variables for account has access to only one MobileCommons company | ||
mc = MobileCommons() | ||
# Pass credentials via environmental variables for account has access to multiple MobileCommons companies | ||
mc = MobileCommons(company_id='EXAMPLE78363BOCA483954419EB70986A68888') | ||
# Pass credentials via argument for account has access to only one MobileCommons company | ||
mc = MobileCommons(username='[email protected]', password='badpassword123') | ||
Then you can call various endpoints: | ||
|
||
.. code-block:: python | ||
# Return all MobileCommons subscribers in a table | ||
subscribers = get_campaign_subscribers(campaign_id=1234567) | ||
# Create a new profile, return profile_id | ||
new_profile=create_profile(phone=3073991987, first_name='Jane', last_name='Fonda') | ||
*** | ||
API | ||
*** | ||
.. autoclass :: parsons.MobileCommons | ||
:inherited-members: |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from parsons.mobilecommons.mobilecommons import MobileCommons | ||
|
||
__all__ = ["MobileCommons"] |
Oops, something went wrong.