Stream_position parameter API | Python
Team -- Need help with getting data from the next stream
I'm using the following code snippet:
events = client.events().get_admin_events(created_after='2022-05-10T22:02:24-07:00', event_types=['DOWNLOAD'])However, I get the following error:
stream_position = events['next_stream_position']
events = client.events().get_admin_events(created_after='2022-05-10T22:02:24-07:00', event_types['DOWNLOAD'],stream_position=stream_position)
TypeError: Events.get_admin_events() got an unexpected keyword argument 'stream_position'
I followed the following documentation:
https://github.com/box/box-python-sdk/blob/main/docs/usage/events.md
My understanding is that the only way to get the data for the next stream is to use the parameter stream_position
Can you please let me know what am I missing?
-
Looks like you have a typo. Its not actually rejecting the stream_position argument. Its not expecting any argument to be there because the argument before it is malformed. You're missing the '='. Try changing:
events = client.events().get_admin_events(created_after='2022-05-10T22:02:24-07:00', event_types['DOWNLOAD'],stream_position=stream_position)
to
events = client.events().get_admin_events(created_after='2022-05-10T22:02:24-07:00', event_types=['DOWNLOAD'],stream_position=stream_position)
投稿コメントは受け付けていません。
コメント
1件のコメント