Skip to content

Instantly share code, notes, and snippets.

View douglas-c-thomas's full-sized avatar

Doug Thomas douglas-c-thomas

  • Covera Health
  • Charleston, SC
View GitHub Profile

Keybase proof

I hereby claim:

  • I am douglas-c-thomas on github.
  • I am douglascthomas (https://keybase.io/douglascthomas) on keybase.
  • I have a public key ASAzq0mkAiKUBFd3KyrWBOoSR4x9dRwnP7jqVwa_KvFgpAo

To claim this, I am signing this object:

from pd.lib.salesforce.platform_api_enterprise_lead import PlatformAPIEnterpriseLead
from pd.lib.salesforce.platform_app import PlatformApp
# Persist the Enterprise Lead in SFDC
lead_data = {
'client_id': main_app.get('client_id'),
'organization_name': main_app.get('name'),
'first_name': user.get('first_name'),
'last_name': user.get('last_name'),
'email': user.get('email'),
from simple_salesforce import Salesforce
sf = Salesforce(username='<username>', password='<password>',
security_token='<security_token>', sandbox=False)
sf_lead_response = sf.Lead.create({
'Company': 'PokitDok',
'FirstName': Doug,
'LastName': 'Thomas,
'Email': 'doug.thomas@pokitdok.com',
'Phone': '212-867-5309',
'Lead_Source_Details__c': 'LinkedIn Campaign',
import pokitdok
pd = pokitdok.api.connect(‘<your client id>’, ‘<your client secret>’)
pd.eligibility({
"member": {
"birth_date": "1970-01-01",
"first_name": "Jane",
"last_name": "Doe",
"id": "W000000000"
},
"trading_partner_id": "MOCKPAYER"
@douglas-c-thomas
douglas-c-thomas / location.py
Last active December 17, 2015 08:38
Reverse Geocoding (lat, long -> {city, state, zip_code})
def reverse_geocode_location(lat, long):
"""
For a given geolocation, return the city, state and zip code in a dictionary
"""
try:
location = {}
lat_long = '%s,%s' % (lat, long)
if lat not in ('', None) and long not in ('', None):
response = urllib2.urlopen("https://maps.googleapis.com/maps/api/geocode/json?%s" %