-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
You must specify a valid end_time #8
Comments
Thank you so much for reporting this issue! I will fix this in just a moment. |
Unfortunately, I get no such error when running the snippet you've posted. |
Try: |
I still don't get the error you've described. |
Hey Eric, no longer OP. I was able to replicate his issue, and was suggesting a solution... Nothing to do with this wrapper, I just think that endpoint that he is manually specifying is expecting more input so doesn't think that his end time is valid. Interesting if the original snippet ran on your implementation though. |
@rmduddy I should mention that I actually didn't get any output either, though I got no error as described by the reporter. I had always assumed this was due to my account not having permissions to access student analytics (I myself am a student, and unlike perhaps yourselves I have limited access to my school's API). |
@ErikBoesen Ah gotcha, yeah I was going to ask if you were running on a basic implementation or if you were on enterprise (although I don't know if basic has API access), that makes sense. Something to keep in mind if specific functions for analytics eventually are written into the wrapper. I have full access, but haven't had much time to play with this wrapper since last we spoke but am happy to help with things that need full admin powers when able. |
@rmduddy There are a couple places where I couldn't test for which new wrapper functions would be terrific. All the analytics is a good example. Also the multi-get and multi-post. If you could help with that I'd much appreciate it! |
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)))
The text was updated successfully, but these errors were encountered: