Description
I am attempting to pull user analytics info with the _get method. When I do, I get: You must specify a valid end_time. I am able to Authenticate into Schoology with my key and secret, but I am not listing them in the following code snippet"
import schoolopy
import time
import datetime
import json
sc = schoolopy.Schoology(schoolopy.Auth('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 'zzzzzzzzzzzzzzzzzzzzzzzzz'))
sc.limit = 10 # Only retrieve 10 objects max
d = datetime.date(2018,2,6)
unixtime = time.mktime(d.timetuple())
#print(time.time())
#print(unixtime)
print('get_me: ' + sc.get_me()['uid'])
z = ''
start_time = int(time.time() - 100000)
end_time = int(time.time())
print('Start_time: ' + str(start_time))
print('End_time: ' + str(end_time))
for x in sc.get_users():
print(x['uid'])
y = int(x['uid'])
print(sc._get('analytics/users/%s?start_time=%s&end_time=%s' % (y, start_time, end_time)))