Reduced Blackboard Data Usage
This commit is contained in:
@@ -96,7 +96,7 @@ public class ModulesAnnouncements extends PartModules<ArrayList<Announcement>> {
|
||||
errorCallback.onError(new NetworkError(101214, 500, "Currently running in offline mode!"));
|
||||
return;
|
||||
}
|
||||
super.get(String.format("https://lms.fu-berlin.de/learn/api/v1/courses/%s/announcements", ID), mLogin.getLoginTokenBB().getCookies(), response -> {
|
||||
super.get(String.format("https://lms.fu-berlin.de/learn/api/v1/courses/%s/announcements?fields=id,title,body.rawText,startDateRestriction,creatorUserId", ID), mLogin.getLoginTokenBB().getCookies(), response -> {
|
||||
String body = response.getParsed();
|
||||
if (body == null) {
|
||||
errorCallback.onError(new NetworkError(101211, 403, "No announcements retrieved!"));
|
||||
|
||||
@@ -233,7 +233,7 @@ public class ModulesList extends HTTPService {
|
||||
callback.onResponse(modulesKVV);
|
||||
return;
|
||||
}
|
||||
get(String.format("https://lms.fu-berlin.de/learn/api/public/v1/users/%s/courses", mLogin.getLoginTokenBB().getId()), mLogin.getLoginTokenBB().getCookies(), response -> {
|
||||
get(String.format("https://lms.fu-berlin.de/learn/api/public/v1/users/%s/courses?fields=courseId,dataSourceId", mLogin.getLoginTokenBB().getId()), mLogin.getLoginTokenBB().getCookies(), response -> {
|
||||
String body = response.getParsed();
|
||||
if (body == null) {
|
||||
errorCallback.onError(new NetworkError(101121, 403, "No module list retrieved!"));
|
||||
@@ -253,7 +253,7 @@ public class ModulesList extends HTTPService {
|
||||
try {
|
||||
JSONObject site = sites[0].getJSONObject(i);
|
||||
String courseId = site.getString("courseId");
|
||||
get(String.format("https://lms.fu-berlin.de/learn/api/v1/courses/%s", courseId), mLogin.getLoginTokenBB().getCookies(), response1 -> {
|
||||
get(String.format("https://lms.fu-berlin.de/learn/api/v1/courses/%s?fields=name,courseId", courseId), mLogin.getLoginTokenBB().getCookies(), response1 -> {
|
||||
String body1 = response1.getParsed();
|
||||
if (body1 == null) {
|
||||
errorCallback.onError(new NetworkError(101124, 403, "No module list retrieved!"));
|
||||
|
||||
Reference in New Issue
Block a user