use of com.instructure.canvasapi2.builders.RestParams in project instructure-android by instructure.
the class FileFolderManager method getFirstPageFolders.
public static void getFirstPageFolders(long folderId, boolean forceNetwork, StatusCallback<List<FileFolder>> callback) {
if (isTesting() || mTesting) {
// TODO
} else {
RestBuilder adapter = new RestBuilder(callback);
RestParams params = new RestParams.Builder().withForceReadFromNetwork(forceNetwork).withPerPageQueryParam(true).build();
FileFolderAPI.getFirstPageFolders(adapter, folderId, callback, params);
}
}
use of com.instructure.canvasapi2.builders.RestParams in project instructure-android by instructure.
the class FileFolderManager method getFirstPageFiles.
public static void getFirstPageFiles(long folderId, boolean forceNetwork, StatusCallback<List<FileFolder>> callback) {
if (isTesting() || mTesting) {
// TODO
} else {
RestBuilder adapter = new RestBuilder(callback);
RestParams params = new RestParams.Builder().withForceReadFromNetwork(forceNetwork).withPerPageQueryParam(true).build();
FileFolderAPI.getFirstPageFiles(adapter, folderId, callback, params);
}
}
use of com.instructure.canvasapi2.builders.RestParams in project instructure-android by instructure.
the class FileFolderManager method getFileFolderFromURLAirwolf.
public static void getFileFolderFromURLAirwolf(String airwolfDomain, String url, StatusCallback<FileFolder> callback) {
if (isTesting() || mTesting) {
// TODO:
} else {
RestBuilder adapter = new RestBuilder(callback);
RestParams params = new RestParams.Builder().withPerPageQueryParam(false).withDomain(airwolfDomain).withAPIVersion("").build();
FileFolderAPI.getFileFolderFromURL(adapter, url, callback, params);
}
}
use of com.instructure.canvasapi2.builders.RestParams in project instructure-android by instructure.
the class FileFolderManager method updateFile.
public static void updateFile(long fileId, UpdateFileFolder updateFileFolder, final StatusCallback<FileFolder> callback) {
if (isTesting() || mTesting) {
// TODO
} else {
final RestBuilder adapter = new RestBuilder(callback);
final RestParams params = new RestParams.Builder().build();
FileFolderAPI.updateFile(fileId, updateFileFolder, adapter, callback, params);
}
}
use of com.instructure.canvasapi2.builders.RestParams in project instructure-android by instructure.
the class FileFolderManager method getRootFolderForContext.
public static void getRootFolderForContext(CanvasContext canvasContext, boolean forceNetwork, StatusCallback<FileFolder> callback) {
if (isTesting() || mTesting) {
// TODO:
} else {
RestBuilder adapter = new RestBuilder(callback);
RestParams params = new RestParams.Builder().withCanvasContext(canvasContext).withForceReadFromNetwork(forceNetwork).withPerPageQueryParam(false).build();
FileFolderAPI.getRootFolderForContext(adapter, canvasContext, callback, params);
}
}
Aggregations