-
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
User Count Limit #10
Comments
Are you able to make this request as expected elsewhere? It sounds like this could be an issue with Schoology's API. |
Thanks for the quick response! I'm able to pull all the records from the Schoology website's "School Analytics" page via "Export All Users." However, I'm not having much luck getting the "get_user"actions()" to work as I expressed in my previous issues. I am relatively new to working with APIs and I'm not sure how to proceed without using your python wrapper. Thank you for your patience. |
Schoology isn't responding to my ticket about this -- can anyone get a hold of someone over there and ask them what's up? |
@jedieaston This project is completely unofficial, we have no more access to Schoology than you do. Is this issue present when making direct requests to the API? |
@ErikBoesen I'm about to check, just thought someone who's a schoology admin might be able to contact support for us and ask if they happened to see this issue. I'm going to try again and see, but I did once before and it wasn't different whether or not I was using the library. |
@jedieaston Understood, sorry if I misinterpreted your question. Unfortunately there's not much I can do as I'm just a student and am not really able to debug these issues. It's not the greatest situation, I confess. |
@ErikBoesen No worries, I'm a student too. Hopefully they get back to me soon, because otherwise this library works great for what I'm doing with it. |
A little update, Schoology just got back to me. If this problem is affecting you, at the end of a request you will get something like this: So, the library would have to implement a multi-get, where if the total exceeded 200, then it would make requests for every 200 and then return the whole result. They left my ticket open if you need more information, @ErikBoesen |
I know this is a little late (four years!!) but for those who run into this issue as well: However, if anyone got a multiget working, could you show me what you did? |
Hello again,
Thanks for your feedback on my previous issues. I am able to pull "user actions" by using "_get()" however, I am unable to pull more than 200 users. I've tried setting the limit to 5000 but it will only return 200. My code below generates a dataframe called "schActivity" and it never has a length greater than 200 although there are over 4000 users in our schoology account. I have admin-level access to our schoology account. Any assistance would be greatly appreciated. Thanks!
Here is my code:
import schoolopy
import time
import datetime
import pandas as pd
import json
sc = schoolopy.Schoology(schoolopy.Auth('xxxxxxxxxxxxxxxxxxxx', 'yyyyyyyyyyyyyyyyyyy'))
sc.limit = 5000 # Only retrieve 10 objects max
sc.start = 1
d = datetime.date(2018,3,7)
unixtime = time.mktime(d.timetuple())
print(unixtime)
end = 1520406000
start = end - 86400
print('Start_time: ' + time.ctime(start))
print('End_time: ' + time.ctime(end))
schActivity = []
cnt = 0
cnt2 = 0
for i in sc.get_users():
#print(i)
schActivity.append(i['uid'])
studentActions = []
for k in schActivity:
k=int(k)
m = sc._get('analytics/users/%s?start_time=%s&end_time=%s&start=0' % (k, start, end))['actions']
if len(m) > 0:
studentActions.append(m)
The text was updated successfully, but these errors were encountered: