Team -- Need help with adding filters to an API call I am making.
I am able to get a response from the API. Mostly followed this page or something similar
But, when I try to add filters shown here, they error out (mind you I am using get_events versus what is shown, but documentation says the filters should be available as long as using admin_logs.
This pull works fine after authenticated and pulls back the info I need... but would like to filter it
events = client.events().get_events(stream_type="admin_logs", limit=500)
stream_position = events['next_stream_position']
for event in events['entries']:
print(event.response_object)
When I make some changes to add in a filter like shown in the docuemntation
stream_position = 0
events = client.events().get_events(stream_type="admin_logs", limit=500, event_types=['ITEM_CREATE'])
stream_position = events['next_stream_position']
for event in events['entries']:
print(event.response_object)
I get
TypeError: get_events() got an unexpected keyword argument 'event_types'
When I run the exact example in the link it also errors:
events = client.events().get_admin_events_streaming(event_types=['ITEM_CREATE'])
for event in events['entries']:
print('Got {0} event that occurred at {1}'.format(event.event_type, event.created_at))
AttributeError: 'Events' object has no attribute 'get_admin_events_streaming'
What are the arguments for events()?