{"action":"created","issue":{"url":"https://api.github.com/repos/box/box-python-sdk/issues/82","labels_url":"https://api.github.com/repos/box/box-python-sdk/issues/82/labels{/name}","comments_url":"https://api.github.com/repos/box/box-python-sdk/issues/82/comments","events_url":"https://api.github.com/repos/box/box-python-sdk/issues/82/events","html_url":"https://github.com/box/box-python-sdk/issues/82","id":111644192,"number":82,"title":"event based trigger","user":{"login":"danyal123","id":12515116,"avatar_url":"https://avatars.githubusercontent.com/u/12515116?v=3","gravatar_id":"","url":"https://api.github.com/users/danyal123","html_url":"https://github.com/danyal123","followers_url":"https://api.github.com/users/danyal123/followers","following_url":"https://api.github.com/users/danyal123/following{/other_user}","gists_url":"https://api.github.com/users/danyal123/gists{/gist_id}","starred_url":"https://api.github.com/users/danyal123/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danyal123/subscriptions","organizations_url":"https://api.github.com/users/danyal123/orgs","repos_url":"https://api.github.com/users/danyal123/repos","events_url":"https://api.github.com/users/danyal123/events{/privacy}","received_events_url":"https://api.github.com/users/danyal123/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-10-15T15:34:46Z","updated_at":"2015-10-20T18:41:42Z","closed_at":"2015-10-19T19:55:23Z","body":"hey i am trying to write a code that would intiate sub_folder creation upon the creation of a parent folder i am trying to use the events module for this but am having issues with the stream_position part \r\nthis is the code i have so far it for some reason does not detect any events at all \r\n\r\n```python\r\ndef events_python(stream_position):\r\n     try :\r\n                  Ev=client.events().get_events(limit=1000,stream_position=stream_position)\r\n                  nxt_stream_pos=Ev['next_stream_position']\r\n                  print (nxt_stream_pos)\r\n                  event_list=client.events().get_events(limit=1000,stream_position=nxt_stream_pos)\r\n                  jsone= (event_list['entries'])\r\n                  dicts={}\r\n                  for k in jsone[0]:\r\n                        if k == None :\r\n                             break\r\n                  dicts[k]=[d[k]for d in jsone]\r\n                  et=dicts['event_type']\r\n                  print (et)\r\n                  item_type=dicts['source']\r\n                  print (item_type)\r\n    except:\r\n                  print ('\\n', 'No new events have occured since the last stream position')\r\n#events_python('now')\r\n\r\n\r\ndef trigger():\r\n    if et == 'ITEM_CREATE'\r\n        (\"execfile('onboarding.py')\")\r\n    else\r\n        break\r\n```"},"comment":{"url":"https://api.github.com/repos/box/box-python-sdk/issues/comments/149661137","html_url":"https://github.com/box/box-python-sdk/issues/82#issuecomment-149661137","issue_url":"https://api.github.com/repos/box/box-python-sdk/issues/82","id":149661137,"user":{"login":"Jeff-Meadows","id":3839339,"avatar_url":"https://avatars.githubusercontent.com/u/3839339?v=3","gravatar_id":"","url":"https://api.github.com/users/Jeff-Meadows","html_url":"https://github.com/Jeff-Meadows","followers_url":"https://api.github.com/users/Jeff-Meadows/followers","following_url":"https://api.github.com/users/Jeff-Meadows/following{/other_user}","gists_url":"https://api.github.com/users/Jeff-Meadows/gists{/gist_id}","starred_url":"https://api.github.com/users/Jeff-Meadows/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jeff-Meadows/subscriptions","organizations_url":"https://api.github.com/users/Jeff-Meadows/orgs","repos_url":"https://api.github.com/users/Jeff-Meadows/repos","events_url":"https://api.github.com/users/Jeff-Meadows/events{/privacy}","received_events_url":"https://api.github.com/users/Jeff-Meadows/received_events","type":"User","site_admin":false},"created_at":"2015-10-20T18:41:42Z","updated_at":"2015-10-20T18:41:42Z","body":"If you just pass ``None`` to ``generate_events_with_long_polling``, it will get the latest stream position for you.\r\n\r\nThe following code prints events for me:\r\n\r\n    for event in client.events().generate_events_with_long_polling():\r\n        print event"}}