use of com.instructure.canvasapi2.models.CanvasContext in project instructure-android by instructure.
the class DiscussionManager method lockDiscussionTopicHeader.
public static void lockDiscussionTopicHeader(@NonNull CanvasContext canvasContext, long topicId, StatusCallback<DiscussionTopicHeader> callback) {
if (isTesting() || mTesting) {
// TODO:
} else {
RestBuilder adapter = new RestBuilder(callback);
RestParams params = new RestParams.Builder().withPerPageQueryParam(false).withShouldIgnoreToken(false).build();
DiscussionAPI.lockDiscussion(adapter, canvasContext, topicId, callback, params);
}
}
use of com.instructure.canvasapi2.models.CanvasContext in project instructure-android by instructure.
the class DiscussionManager method rateDiscussionEntry.
public static void rateDiscussionEntry(CanvasContext canvasContext, long topicId, long entryId, int rating, StatusCallback<Void> callback) {
if (isTesting() || mTesting) {
// TODO:
} else {
RestBuilder adapter = new RestBuilder(callback);
DiscussionAPI.rateDiscussionEntry(adapter, canvasContext, topicId, entryId, rating, callback, new RestParams.Builder().build());
}
}
use of com.instructure.canvasapi2.models.CanvasContext in project instructure-android by instructure.
the class DiscussionManager method deleteDiscussionTopicHeader.
public static void deleteDiscussionTopicHeader(@NonNull CanvasContext canvasContext, long topicId, StatusCallback<Void> callback) {
if (isTesting() || mTesting) {
// TODO:
} else {
RestBuilder adapter = new RestBuilder(callback);
RestParams params = new RestParams.Builder().withPerPageQueryParam(false).withShouldIgnoreToken(false).build();
DiscussionAPI.deleteDiscussionTopicHeader(adapter, canvasContext, topicId, callback, params);
}
}
use of com.instructure.canvasapi2.models.CanvasContext in project instructure-android by instructure.
the class DiscussionManager method markReplyAsReadSynchronously.
public static boolean markReplyAsReadSynchronously(CanvasContext canvasContext, long topicId) {
if (isTesting() || mTesting) {
// TODO
return true;
} else {
RestBuilder adapter = new RestBuilder();
RestParams params = new RestParams.Builder().build();
return DiscussionAPI.markReplyAsReadSynchronous(canvasContext, topicId, adapter, params);
}
}
use of com.instructure.canvasapi2.models.CanvasContext in project instructure-android by instructure.
the class DiscussionManager method editDiscussionTopic.
public static void editDiscussionTopic(CanvasContext canvasContext, long discussionHeaderId, DiscussionTopicPostBody discussionTopicPostBody, StatusCallback<DiscussionTopicHeader> callback) {
if (isTesting() || mTesting) {
// TODO
} else {
RestBuilder adapter = new RestBuilder(callback);
RestParams params = new RestParams.Builder().withPerPageQueryParam(false).withShouldIgnoreToken(false).build();
DiscussionAPI.editDiscussionTopic(canvasContext, discussionHeaderId, discussionTopicPostBody, adapter, callback, params);
}
}
Aggregations