use of com.instructure.canvasapi2.models.DiscussionEntry in project instructure-android by instructure.
the class DiscussionManager method replyToDiscussionEntry.
public static void replyToDiscussionEntry(CanvasContext canvasContext, long topicId, long entryId, String message, File attachment, String mimeType, StatusCallback<DiscussionEntry> callback) {
if (isTesting() || mTesting) {
// TODO:
} else {
RestBuilder adapter = new RestBuilder(callback);
RestParams params = new RestParams.Builder().build();
DiscussionAPI.replyToDiscussionEntryWithAttachment(adapter, canvasContext, topicId, entryId, message, attachment, mimeType, callback, params);
}
}
use of com.instructure.canvasapi2.models.DiscussionEntry in project instructure-android by instructure.
the class DiscussionManager method postToDiscussionTopic.
public static void postToDiscussionTopic(CanvasContext canvasContext, long topicId, String message, StatusCallback<DiscussionEntry> callback) {
if (isTesting() || mTesting) {
// TODO:
} else {
RestBuilder adapter = new RestBuilder(callback);
RestParams params = new RestParams.Builder().build();
DiscussionAPI.postToDiscussionTopic(adapter, canvasContext, topicId, message, callback, params);
}
}
use of com.instructure.canvasapi2.models.DiscussionEntry in project instructure-android by instructure.
the class DiscussionManager method getDiscussionEntries.
public static void getDiscussionEntries(CanvasContext canvasContext, long topicId, boolean forceNetwork, StatusCallback<List<DiscussionEntry>> callback) {
if (isTesting() || mTesting) {
// TODO:
} else {
RestBuilder adapter = new RestBuilder(callback);
RestParams params = new RestParams.Builder().withPerPageQueryParam(true).withForceReadFromNetwork(forceNetwork).build();
DiscussionAPI.getDiscussionEntries(adapter, canvasContext, topicId, callback, params);
}
}
use of com.instructure.canvasapi2.models.DiscussionEntry in project instructure-android by instructure.
the class DiscussionManager method replyToDiscussionEntry.
public static void replyToDiscussionEntry(CanvasContext canvasContext, long topicId, long entryId, String message, StatusCallback<DiscussionEntry> callback) {
if (isTesting() || mTesting) {
// TODO:
} else {
RestBuilder adapter = new RestBuilder(callback);
RestParams params = new RestParams.Builder().build();
DiscussionAPI.replyToDiscussionEntry(adapter, canvasContext, topicId, entryId, message, callback, params);
}
}
use of com.instructure.canvasapi2.models.DiscussionEntry in project instructure-android by instructure.
the class DiscussionEntryHTMLConverterTest method getReadState_unread.
@Test
public void getReadState_unread() throws Exception {
DiscussionEntryHtmlConverter converter = new DiscussionEntryHtmlConverter();
DiscussionEntry discussionEntry = new DiscussionEntry();
discussionEntry.setUnread(true);
String testValue = converter.getReadState(discussionEntry);
assertEquals("unread", testValue);
}
Aggregations