Skip to content

Commit

Permalink
[skip ci] Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
ci-build committed Mar 7, 2024
1 parent 5e6fa0a commit c1a445b
Show file tree
Hide file tree
Showing 559 changed files with 4,677 additions and 374 deletions.
2 changes: 1 addition & 1 deletion html/latest/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 74053ede7429cbc1acc372343f784fe9
config: 58b226480f7510ab8851b353b421b547
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file modified html/latest/.doctrees/actblue.doctree
Binary file not shown.
Binary file modified html/latest/.doctrees/action_builder.doctree
Binary file not shown.
Binary file modified html/latest/.doctrees/action_kit.doctree
Binary file not shown.
Binary file modified html/latest/.doctrees/action_network.doctree
Binary file not shown.
Binary file modified html/latest/.doctrees/airtable.doctree
Binary file not shown.
Binary file modified html/latest/.doctrees/alchemer.doctree
Binary file not shown.
Binary file modified html/latest/.doctrees/auth0.doctree
Binary file not shown.
Binary file modified html/latest/.doctrees/aws.doctree
Binary file not shown.
Binary file modified html/latest/.doctrees/azure.doctree
Binary file not shown.
Binary file modified html/latest/.doctrees/bill_com.doctree
Binary file not shown.
Binary file modified html/latest/.doctrees/bloomerang.doctree
Binary file not shown.
Binary file modified html/latest/.doctrees/bluelink.doctree
Binary file not shown.
Binary file modified html/latest/.doctrees/box.doctree
Binary file not shown.
Binary file modified html/latest/.doctrees/braintree.doctree
Binary file not shown.
Binary file modified html/latest/.doctrees/build_a_connector.doctree
Binary file not shown.
Binary file modified html/latest/.doctrees/capitolcanary.doctree
Binary file not shown.
Binary file modified html/latest/.doctrees/catalist.doctree
Binary file not shown.
Binary file modified html/latest/.doctrees/census.doctree
Binary file not shown.
Binary file modified html/latest/.doctrees/census_geocoder.doctree
Binary file not shown.
Binary file modified html/latest/.doctrees/civis.doctree
Binary file not shown.
Binary file modified html/latest/.doctrees/contributing.doctree
Binary file not shown.
Binary file modified html/latest/.doctrees/controlshift.doctree
Binary file not shown.
Binary file modified html/latest/.doctrees/copper.doctree
Binary file not shown.
Binary file modified html/latest/.doctrees/crowdtangle.doctree
Binary file not shown.
Binary file modified html/latest/.doctrees/databases.doctree
Binary file not shown.
Binary file modified html/latest/.doctrees/dbsync.doctree
Binary file not shown.
Binary file modified html/latest/.doctrees/donorbox.doctree
Binary file not shown.
Binary file modified html/latest/.doctrees/environment.pickle
Binary file not shown.
Binary file modified html/latest/.doctrees/facebook_ads.doctree
Binary file not shown.
Binary file modified html/latest/.doctrees/formstack.doctree
Binary file not shown.
Binary file modified html/latest/.doctrees/freshdesk.doctree
Binary file not shown.
Binary file modified html/latest/.doctrees/github.doctree
Binary file not shown.
Binary file modified html/latest/.doctrees/google.doctree
Binary file not shown.
Binary file modified html/latest/.doctrees/hustle.doctree
Binary file not shown.
Binary file modified html/latest/.doctrees/index.doctree
Binary file not shown.
Binary file modified html/latest/.doctrees/mailchimp.doctree
Binary file not shown.
Binary file modified html/latest/.doctrees/mobilecommons.doctree
Binary file not shown.
Binary file modified html/latest/.doctrees/mobilize_america.doctree
Binary file not shown.
Binary file modified html/latest/.doctrees/nation_builder.doctree
Binary file not shown.
Binary file modified html/latest/.doctrees/newmode.doctree
Binary file not shown.
Binary file modified html/latest/.doctrees/ngpvan.doctree
Binary file not shown.
Binary file modified html/latest/.doctrees/notifications.doctree
Binary file not shown.
Binary file modified html/latest/.doctrees/p2a.doctree
Binary file not shown.
Binary file modified html/latest/.doctrees/pdi.doctree
Binary file not shown.
Binary file modified html/latest/.doctrees/quickbase.doctree
Binary file not shown.
Binary file modified html/latest/.doctrees/redash.doctree
Binary file not shown.
Binary file modified html/latest/.doctrees/rockthevote.doctree
Binary file not shown.
Binary file modified html/latest/.doctrees/salesforce.doctree
Binary file not shown.
Binary file modified html/latest/.doctrees/scytl.doctree
Binary file not shown.
Binary file modified html/latest/.doctrees/sftp.doctree
Binary file not shown.
Binary file modified html/latest/.doctrees/shopify.doctree
Binary file not shown.
Binary file modified html/latest/.doctrees/sisense.doctree
Binary file not shown.
Binary file modified html/latest/.doctrees/table.doctree
Binary file not shown.
Binary file modified html/latest/.doctrees/targetsmart.doctree
Binary file not shown.
Binary file modified html/latest/.doctrees/targetsmart_api.doctree
Binary file not shown.
Binary file modified html/latest/.doctrees/targetsmart_automation_workflows.doctree
Binary file not shown.
Binary file modified html/latest/.doctrees/training_guides/etl_best_practices.doctree
Binary file not shown.
Binary file modified html/latest/.doctrees/training_guides/getting_set_up.doctree
Binary file not shown.
Binary file modified html/latest/.doctrees/turbovote.doctree
Binary file not shown.
Binary file modified html/latest/.doctrees/twilio.doctree
Binary file not shown.
Binary file not shown.
Binary file modified html/latest/.doctrees/use_cases/contribute_use_cases.doctree
Binary file not shown.
Binary file modified html/latest/.doctrees/use_cases/mysql_to_googlesheets.doctree
Binary file not shown.
Binary file modified html/latest/.doctrees/use_cases/opt_outs_to_everyaction.doctree
Binary file not shown.
Binary file modified html/latest/.doctrees/utilities.doctree
Binary file not shown.
Binary file modified html/latest/.doctrees/write_tests.doctree
Binary file not shown.
Binary file modified html/latest/.doctrees/zoom.doctree
Binary file not shown.
2 changes: 1 addition & 1 deletion html/latest/_modules/parsons/google/google_bigquery.html
Original file line number Diff line number Diff line change
Expand Up @@ -1225,7 +1225,7 @@ <h1>Source code for parsons.google.google_bigquery</h1><div class="highlight"><p
<span class="n">base_query</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot;&quot;&quot;</span>
<span class="s2"> SELECT</span>
<span class="s2"> *</span>
<span class="s2"> FROM `</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">project</span><span class="si">}</span><span class="s2">.</span><span class="si">{</span><span class="n">schema</span><span class="si">}</span><span class="s2">.INFORMATION_SCHEMA.COLUMNS`</span>
<span class="s2"> FROM `</span><span class="si">{</span><span class="n">schema</span><span class="si">}</span><span class="s2">.INFORMATION_SCHEMA.COLUMNS`</span>
<span class="s2"> WHERE</span>
<span class="s2"> table_name = &#39;</span><span class="si">{</span><span class="n">table_name</span><span class="si">}</span><span class="s2">&#39;</span>
<span class="s2"> &quot;&quot;&quot;</span>
Expand Down
2 changes: 1 addition & 1 deletion html/latest/census.html
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ <h3>Quickstart<a class="headerlink" href="#quickstart" title="Permalink to this



<dd><a href="../stable/index.html">stable</a></dd>
<dd><a href="../stable/census.html">stable</a></dd>



Expand Down
2 changes: 1 addition & 1 deletion html/latest/formstack.html
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ <h2>API<a class="headerlink" href="#api" title="Permalink to this heading"></



<dd><a href="../stable/index.html">stable</a></dd>
<dd><a href="../stable/formstack.html">stable</a></dd>



Expand Down
2 changes: 1 addition & 1 deletion html/stable/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 7ecd7c4f50cd05490eb384295189b23c
config: 334facf2d79718d788f644e15b9ecd44
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file modified html/stable/.doctrees/actblue.doctree
Binary file not shown.
Binary file modified html/stable/.doctrees/action_builder.doctree
Binary file not shown.
Binary file modified html/stable/.doctrees/action_kit.doctree
Binary file not shown.
Binary file modified html/stable/.doctrees/action_network.doctree
Binary file not shown.
Binary file modified html/stable/.doctrees/airtable.doctree
Binary file not shown.
Binary file modified html/stable/.doctrees/alchemer.doctree
Binary file not shown.
Binary file modified html/stable/.doctrees/auth0.doctree
Binary file not shown.
Binary file modified html/stable/.doctrees/aws.doctree
Binary file not shown.
Binary file modified html/stable/.doctrees/azure.doctree
Binary file not shown.
Binary file modified html/stable/.doctrees/bill_com.doctree
Binary file not shown.
Binary file modified html/stable/.doctrees/bloomerang.doctree
Binary file not shown.
Binary file modified html/stable/.doctrees/bluelink.doctree
Binary file not shown.
Binary file modified html/stable/.doctrees/box.doctree
Binary file not shown.
Binary file modified html/stable/.doctrees/braintree.doctree
Binary file not shown.
Binary file modified html/stable/.doctrees/build_a_connector.doctree
Binary file not shown.
Binary file modified html/stable/.doctrees/capitolcanary.doctree
Binary file not shown.
Binary file modified html/stable/.doctrees/catalist.doctree
Binary file not shown.
Binary file added html/stable/.doctrees/census.doctree
Binary file not shown.
Binary file modified html/stable/.doctrees/census_geocoder.doctree
Binary file not shown.
Binary file modified html/stable/.doctrees/civis.doctree
Binary file not shown.
Binary file modified html/stable/.doctrees/contributing.doctree
Binary file not shown.
Binary file modified html/stable/.doctrees/controlshift.doctree
Binary file not shown.
Binary file modified html/stable/.doctrees/copper.doctree
Binary file not shown.
Binary file modified html/stable/.doctrees/crowdtangle.doctree
Binary file not shown.
Binary file modified html/stable/.doctrees/databases.doctree
Binary file not shown.
Binary file modified html/stable/.doctrees/dbsync.doctree
Binary file not shown.
Binary file modified html/stable/.doctrees/donorbox.doctree
Binary file not shown.
Binary file modified html/stable/.doctrees/environment.pickle
Binary file not shown.
Binary file modified html/stable/.doctrees/facebook_ads.doctree
Binary file not shown.
Binary file added html/stable/.doctrees/formstack.doctree
Binary file not shown.
Binary file modified html/stable/.doctrees/freshdesk.doctree
Binary file not shown.
Binary file modified html/stable/.doctrees/github.doctree
Binary file not shown.
Binary file modified html/stable/.doctrees/google.doctree
Binary file not shown.
Binary file modified html/stable/.doctrees/hustle.doctree
Binary file not shown.
Binary file modified html/stable/.doctrees/index.doctree
Binary file not shown.
Binary file modified html/stable/.doctrees/mailchimp.doctree
Binary file not shown.
Binary file modified html/stable/.doctrees/mobilecommons.doctree
Binary file not shown.
Binary file modified html/stable/.doctrees/mobilize_america.doctree
Binary file not shown.
Binary file modified html/stable/.doctrees/nation_builder.doctree
Binary file not shown.
Binary file modified html/stable/.doctrees/newmode.doctree
Binary file not shown.
Binary file modified html/stable/.doctrees/ngpvan.doctree
Binary file not shown.
Binary file modified html/stable/.doctrees/notifications.doctree
Binary file not shown.
Binary file modified html/stable/.doctrees/p2a.doctree
Binary file not shown.
Binary file modified html/stable/.doctrees/pdi.doctree
Binary file not shown.
Binary file modified html/stable/.doctrees/quickbase.doctree
Binary file not shown.
Binary file modified html/stable/.doctrees/redash.doctree
Binary file not shown.
Binary file modified html/stable/.doctrees/rockthevote.doctree
Binary file not shown.
Binary file modified html/stable/.doctrees/salesforce.doctree
Binary file not shown.
Binary file modified html/stable/.doctrees/scytl.doctree
Binary file not shown.
Binary file modified html/stable/.doctrees/sftp.doctree
Binary file not shown.
Binary file modified html/stable/.doctrees/shopify.doctree
Binary file not shown.
Binary file modified html/stable/.doctrees/sisense.doctree
Binary file not shown.
Binary file modified html/stable/.doctrees/table.doctree
Binary file not shown.
Binary file modified html/stable/.doctrees/targetsmart.doctree
Binary file not shown.
Binary file modified html/stable/.doctrees/targetsmart_api.doctree
Binary file not shown.
Binary file modified html/stable/.doctrees/targetsmart_automation_workflows.doctree
Binary file not shown.
Binary file modified html/stable/.doctrees/training_guides/etl_best_practices.doctree
Binary file not shown.
Binary file modified html/stable/.doctrees/training_guides/getting_set_up.doctree
Binary file not shown.
Binary file modified html/stable/.doctrees/turbovote.doctree
Binary file not shown.
Binary file modified html/stable/.doctrees/twilio.doctree
Binary file not shown.
Binary file not shown.
Binary file modified html/stable/.doctrees/use_cases/contribute_use_cases.doctree
Binary file not shown.
Binary file modified html/stable/.doctrees/use_cases/mysql_to_googlesheets.doctree
Binary file not shown.
Binary file modified html/stable/.doctrees/use_cases/opt_outs_to_everyaction.doctree
Binary file not shown.
Binary file modified html/stable/.doctrees/utilities.doctree
Binary file not shown.
Binary file modified html/stable/.doctrees/write_tests.doctree
Binary file not shown.
Binary file modified html/stable/.doctrees/zoom.doctree
Binary file not shown.
4 changes: 4 additions & 0 deletions html/stable/_modules/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,15 @@
<li class="toctree-l1"><a class="reference internal" href="../box.html">Box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../braintree.html">Braintree</a></li>
<li class="toctree-l1"><a class="reference internal" href="../capitolcanary.html">CapitolCanary</a></li>
<li class="toctree-l1"><a class="reference internal" href="../census.html">Census</a></li>
<li class="toctree-l1"><a class="reference internal" href="../civis.html">Civis</a></li>
<li class="toctree-l1"><a class="reference internal" href="../controlshift.html">Controlshift</a></li>
<li class="toctree-l1"><a class="reference internal" href="../copper.html">Copper</a></li>
<li class="toctree-l1"><a class="reference internal" href="../crowdtangle.html">CrowdTangle</a></li>
<li class="toctree-l1"><a class="reference internal" href="../databases.html">Databases</a></li>
<li class="toctree-l1"><a class="reference internal" href="../donorbox.html">Donorbox</a></li>
<li class="toctree-l1"><a class="reference internal" href="../facebook_ads.html">FacebookAds</a></li>
<li class="toctree-l1"><a class="reference internal" href="../formstack.html">Formstack</a></li>
<li class="toctree-l1"><a class="reference internal" href="../freshdesk.html">Freshdesk</a></li>
<li class="toctree-l1"><a class="reference internal" href="../github.html">GitHub</a></li>
<li class="toctree-l1"><a class="reference internal" href="../google.html">Google</a></li>
Expand Down Expand Up @@ -161,6 +163,7 @@ <h1>All modules for which code is available</h1>
<li><a href="parsons/braintree/braintree.html">parsons.braintree.braintree</a></li>
<li><a href="parsons/capitol_canary/capitol_canary.html">parsons.capitol_canary.capitol_canary</a></li>
<li><a href="parsons/catalist/catalist.html">parsons.catalist.catalist</a></li>
<li><a href="parsons/census/census.html">parsons.census.census</a></li>
<li><a href="parsons/civis/civisclient.html">parsons.civis.civisclient</a></li>
<li><a href="parsons/controlshift/controlshift.html">parsons.controlshift.controlshift</a></li>
<li><a href="parsons/copper/copper.html">parsons.copper.copper</a></li>
Expand All @@ -176,6 +179,7 @@ <h1>All modules for which code is available</h1>
<li><a href="parsons/etl/table.html">parsons.etl.table</a></li>
<li><a href="parsons/etl/tofrom.html">parsons.etl.tofrom</a></li>
<li><a href="parsons/facebook_ads/facebook_ads.html">parsons.facebook_ads.facebook_ads</a></li>
<li><a href="parsons/formstack/formstack.html">parsons.formstack.formstack</a></li>
<li><a href="parsons/freshdesk/freshdesk.html">parsons.freshdesk.freshdesk</a></li>
<li><a href="parsons/geocode/census_geocoder.html">parsons.geocode.census_geocoder</a></li>
<li><a href="parsons/github/github.html">parsons.github.github</a></li>
Expand Down
2 changes: 2 additions & 0 deletions html/stable/_modules/parsons/actblue/actblue.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,15 @@
<li class="toctree-l1"><a class="reference internal" href="../../../box.html">Box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../braintree.html">Braintree</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../capitolcanary.html">CapitolCanary</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../census.html">Census</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../civis.html">Civis</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../controlshift.html">Controlshift</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../copper.html">Copper</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../crowdtangle.html">CrowdTangle</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../databases.html">Databases</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../donorbox.html">Donorbox</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../facebook_ads.html">FacebookAds</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../formstack.html">Formstack</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../freshdesk.html">Freshdesk</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../github.html">GitHub</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../google.html">Google</a></li>
Expand Down
68 changes: 66 additions & 2 deletions html/stable/_modules/parsons/action_builder/action_builder.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,15 @@
<li class="toctree-l1"><a class="reference internal" href="../../../box.html">Box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../braintree.html">Braintree</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../capitolcanary.html">CapitolCanary</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../census.html">Census</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../civis.html">Civis</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../controlshift.html">Controlshift</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../copper.html">Copper</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../crowdtangle.html">CrowdTangle</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../databases.html">Databases</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../donorbox.html">Donorbox</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../facebook_ads.html">FacebookAds</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../formstack.html">Formstack</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../freshdesk.html">Freshdesk</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../github.html">GitHub</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../google.html">Google</a></li>
Expand Down Expand Up @@ -517,7 +519,9 @@ <h1>Source code for parsons.action_builder.action_builder</h1><div class="highli
<span class="sa">f</span><span class="s2">&quot;campaigns/</span><span class="si">{</span><span class="n">campaign</span><span class="si">}</span><span class="s2">/</span><span class="si">{</span><span class="n">endpoint</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">tag_id</span><span class="p">)</span><span class="si">}</span><span class="s2">/</span><span class="si">{</span><span class="n">tagging_id</span><span class="si">}</span><span class="s2">&quot;</span>
<span class="p">)</span></div>

<div class="viewcode-block" id="ActionBuilder.upsert_connection"><a class="viewcode-back" href="../../../action_builder.html#parsons.ActionBuilder.upsert_connection">[docs]</a> <span class="k">def</span> <span class="nf">upsert_connection</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">identifiers</span><span class="p">,</span> <span class="n">tag_data</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">campaign</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<div class="viewcode-block" id="ActionBuilder.upsert_connection"><a class="viewcode-back" href="../../../action_builder.html#parsons.ActionBuilder.upsert_connection">[docs]</a> <span class="k">def</span> <span class="nf">upsert_connection</span><span class="p">(</span>
<span class="bp">self</span><span class="p">,</span> <span class="n">identifiers</span><span class="p">,</span> <span class="n">tag_data</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">campaign</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">reactivate</span><span class="o">=</span><span class="kc">True</span>
<span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Load or update a connection record in Action Builder between two existing entity records.</span>
<span class="sd"> Only one connection record is allowed per pair of entities, so if the connection already</span>
Expand All @@ -534,6 +538,9 @@ <h1>Source code for parsons.action_builder.action_builder</h1><div class="highli
<span class="sd"> campaign: str</span>
<span class="sd"> Optional. The 36-character &quot;interact ID&quot; of the campaign whose data is to be</span>
<span class="sd"> retrieved or edited. Not necessary if supplied when instantiating the class.</span>
<span class="sd"> reactivate: bool</span>
<span class="sd"> Optional. Whether or not to set the `inactive` flag on a given Connection to False</span>
<span class="sd"> if the Connection exists and has `inactive` set to True. True by default.</span>
<span class="sd"> `Returns:`</span>
<span class="sd"> Dict containing Action Builder connection data.</span>
<span class="sd"> &quot;&quot;&quot;</span> <span class="c1"># noqa: E501</span>
Expand All @@ -556,6 +563,9 @@ <h1>Source code for parsons.action_builder.action_builder</h1><div class="highli
<span class="p">}</span>
<span class="p">}</span>

<span class="k">if</span> <span class="n">reactivate</span><span class="p">:</span>
<span class="n">data</span><span class="p">[</span><span class="s2">&quot;connection&quot;</span><span class="p">][</span><span class="s2">&quot;inactive&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="kc">False</span>

<span class="k">if</span> <span class="n">tag_data</span><span class="p">:</span>
<span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">tag_data</span><span class="p">,</span> <span class="nb">dict</span><span class="p">):</span>
<span class="n">tag_data</span> <span class="o">=</span> <span class="p">[</span><span class="n">tag_data</span><span class="p">]</span>
Expand All @@ -565,7 +575,61 @@ <h1>Source code for parsons.action_builder.action_builder</h1><div class="highli

<span class="n">data</span><span class="p">[</span><span class="s2">&quot;add_tags&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">tag_data</span>

<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">api</span><span class="o">.</span><span class="n">post_request</span><span class="p">(</span><span class="n">url</span><span class="o">=</span><span class="n">url</span><span class="p">,</span> <span class="n">data</span><span class="o">=</span><span class="n">json</span><span class="o">.</span><span class="n">dumps</span><span class="p">(</span><span class="n">data</span><span class="p">))</span></div></div>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">api</span><span class="o">.</span><span class="n">post_request</span><span class="p">(</span><span class="n">url</span><span class="o">=</span><span class="n">url</span><span class="p">,</span> <span class="n">data</span><span class="o">=</span><span class="n">json</span><span class="o">.</span><span class="n">dumps</span><span class="p">(</span><span class="n">data</span><span class="p">))</span></div>

<div class="viewcode-block" id="ActionBuilder.deactivate_connection"><a class="viewcode-back" href="../../../action_builder.html#parsons.ActionBuilder.deactivate_connection">[docs]</a> <span class="k">def</span> <span class="nf">deactivate_connection</span><span class="p">(</span>
<span class="bp">self</span><span class="p">,</span>
<span class="n">from_identifier</span><span class="p">,</span>
<span class="n">connection_identifier</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
<span class="n">to_identifier</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
<span class="n">campaign</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
<span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Deactivate an existing connection record in Action Builder between two existing entity</span>
<span class="sd"> records. Only one connection record is allowed per pair of entities, so this can be done</span>
<span class="sd"> by supplying the ID for the connection record, or for the two connected entity records.</span>
<span class="sd"> `Args:`</span>
<span class="sd"> from_identifier: str</span>
<span class="sd"> Unique identifier for one of the two entities with a connection.</span>
<span class="sd"> connection_identifier: str</span>
<span class="sd"> Optional. The unique identifier for an entity or connection record being updated.</span>
<span class="sd"> If omitted, `to_identifier` must be provided.</span>
<span class="sd"> to_identifier: str</span>
<span class="sd"> Optional. The second entity with a connection to `from_entity`. If omitted,</span>
<span class="sd"> `connection_identifier` must be provided.</span>
<span class="sd"> campaign: str</span>
<span class="sd"> Optional. The 36-character &quot;interact ID&quot; of the campaign whose data is to be</span>
<span class="sd"> retrieved or edited. Not necessary if supplied when instantiating the class.</span>
<span class="sd"> `Returns:`</span>
<span class="sd"> Dict containing Action Builder connection data.</span>
<span class="sd"> &quot;&quot;&quot;</span>

<span class="c1"># Check that either connection or second entity identifier are provided</span>
<span class="k">if</span> <span class="p">{</span><span class="n">connection_identifier</span><span class="p">,</span> <span class="n">to_identifier</span><span class="p">}</span> <span class="o">==</span> <span class="p">{</span><span class="kc">None</span><span class="p">}:</span>
<span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span>
<span class="s2">&quot;Must provide a connection ID or an ID for the second entity&quot;</span>
<span class="p">)</span>

<span class="n">campaign</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_campaign_check</span><span class="p">(</span><span class="n">campaign</span><span class="p">)</span>

<span class="n">url</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot;campaigns/</span><span class="si">{</span><span class="n">campaign</span><span class="si">}</span><span class="s2">/people/</span><span class="si">{</span><span class="n">from_identifier</span><span class="si">}</span><span class="s2">/connections&quot;</span>

<span class="n">data</span> <span class="o">=</span> <span class="p">{</span><span class="s2">&quot;connection&quot;</span><span class="p">:</span> <span class="p">{</span><span class="s2">&quot;inactive&quot;</span><span class="p">:</span> <span class="kc">True</span><span class="p">}}</span>

<span class="c1"># Prioritize connection ID to avoid potential confusion if to_identifier is also provided</span>
<span class="c1"># to_identifier entity could have duplicates, connection ID is more specific</span>
<span class="k">if</span> <span class="n">connection_identifier</span><span class="p">:</span>
<span class="n">url</span> <span class="o">+=</span> <span class="sa">f</span><span class="s2">&quot;/</span><span class="si">{</span><span class="n">connection_identifier</span><span class="si">}</span><span class="s2">&quot;</span>

<span class="c1"># Despite the documentation, PUT requests don&#39;t require the outer &quot;connection&quot; key</span>
<span class="n">data</span> <span class="o">=</span> <span class="n">data</span><span class="p">[</span><span class="s2">&quot;connection&quot;</span><span class="p">]</span>

<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">api</span><span class="o">.</span><span class="n">put_request</span><span class="p">(</span><span class="n">url</span><span class="o">=</span><span class="n">url</span><span class="p">,</span> <span class="n">data</span><span class="o">=</span><span class="n">json</span><span class="o">.</span><span class="n">dumps</span><span class="p">(</span><span class="n">data</span><span class="p">))</span>

<span class="c1"># If no connection ID then there must be a to_identifier not to have errored by now</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">data</span><span class="p">[</span><span class="s2">&quot;connection&quot;</span><span class="p">][</span><span class="s2">&quot;person_id&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">to_identifier</span>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">api</span><span class="o">.</span><span class="n">post_request</span><span class="p">(</span><span class="n">url</span><span class="o">=</span><span class="n">url</span><span class="p">,</span> <span class="n">data</span><span class="o">=</span><span class="n">json</span><span class="o">.</span><span class="n">dumps</span><span class="p">(</span><span class="n">data</span><span class="p">))</span></div></div>
</pre></div>

</div>
Expand Down
Loading

0 comments on commit c1a445b

Please sign in to comment.