Last active
May 10, 2016 17:57
-
-
Save foxwill/f37190e8509d5af5bc51d62e598cdf21 to your computer and use it in GitHub Desktop.
Get events by event type using an array of event types to retrieve
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
import onelogin | |
# specify client_id, client_secret, and shard (us or eu) | |
creds = {'client_id':'', | |
'client_secret':'', | |
'shard':''} | |
token = onelogin.Token(**creds) | |
# Create the events object with the token | |
onelogin_events = onelogin.Events(token) | |
# list the event types | |
events = [147, 148, 149, 150, 151, 152] | |
each = 0 | |
while each <= len(events): | |
event_type = each | |
print "==========RESULT============" | |
print "======EVENT TYPE: %d======" % events[event_type] | |
print onelogin_events.search(**{'since':'2016-05-01T00:00:00.681Z', 'event_type_id':'%d' % (events[event_type])}) | |
each += 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment