Aug-21-2018, 02:12 PM
(Aug-21-2018, 02:08 PM)uklipse Wrote: he others were already there so I think the while loop is to read from all the data and just print it to the screenThat exactly means all events come as one json. They loop over events in order to print them on separate lines. Otherwise thej will print everything on one line.
try
while True: data = export_events(token, event_type, batch_size, start_date, end_date, client_id, client_secret) if data: with open('events.json','w') as outfile: json.dump(data,outfile, indent=2, sort_keys=True)
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs