Last active
September 26, 2018 21:07
-
-
Save maxgutman/ac6f21e6085b61782a121e7fc84cbb73 to your computer and use it in GitHub Desktop.
Revisions
-
maxgutman revised this gist
Sep 26, 2018 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,5 @@ configuration = mparticle.Configuration() configuration = mparticle.Configuration() configuration.api_key = settings.MPARTICLE_API_KEY configuration.api_secret = settings.MPARTICLE_API_SECRET -
maxgutman revised this gist
Sep 26, 2018 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,4 @@ configuration = mparticle.Configuration() configuration.api_key = settings.MPARTICLE_API_KEY configuration.api_secret = settings.MPARTICLE_API_SECRET -
maxgutman renamed this gist
Sep 26, 2018 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
maxgutman created this gist
Sep 26, 2018 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ 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)