Last active
September 26, 2018 21:07
-
-
Save maxgutman/ac6f21e6085b61782a121e7fc84cbb73 to your computer and use it in GitHub Desktop.
mparticle-cmb
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
configuration = mparticle.Configuration() | |
configuration = mparticle.Configuration() | |
configuration.api_key = settings.MPARTICLE_API_KEY | |
configuration.api_secret = settings.MPARTICLE_API_SECRET | |
batch = mparticle.Batch() | |
batch.environment = 'production' | |
batch.user_identities = mparticle.UserIdentities(customerid=profile_id) | |
batch.events = [mparticle.AppEvent( | |
event_name='Connection Summary', | |
custom_attributes={ | |
'New Connections': total_new_connections, | |
'Expired Connections': total_expired_connections, | |
} | |
)] | |
batches.append(batch) | |
mparticle_api = mparticle.EventsApi(configuration) | |
mparticle_api.bulk_upload_events(batches) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment