use of com.instructure.canvasapi2.utils.LinkHeaders in project instructure-android by instructure.
the class InboxManager_Test method markConversationAsRead.
public static void markConversationAsRead(long conversationId, String conversationEvent, StatusCallback<Void> callback) {
Response rawResponse = new Response.Builder().code(200).message("todo").protocol(Protocol.HTTP_1_0).body(ResponseBody.create(MediaType.parse("application/json"), "todo".getBytes())).addHeader("content-type", "application/json").build();
// We don't care about the response
retrofit2.Response<Void> response = retrofit2.Response.success(null, rawResponse);
callback.onResponse(response, new LinkHeaders(), ApiType.CACHE);
}
use of com.instructure.canvasapi2.utils.LinkHeaders in project instructure-android by instructure.
the class InboxManager_Test method getConversation.
public static void getConversation(RestBuilder adapter, StatusCallback<Conversation> callback, RestParams params, long conversationId) {
// TODO:
Response response = new Response.Builder().code(200).message("todo").protocol(Protocol.HTTP_1_0).body(ResponseBody.create(MediaType.parse("application/json"), "todo".getBytes())).addHeader("content-type", "application/json").build();
Conversation conversation = new Conversation();
retrofit2.Response<Conversation> retrofitResponse = retrofit2.Response.success(conversation, response);
callback.onResponse(retrofitResponse, new LinkHeaders(), ApiType.CACHE);
}
use of com.instructure.canvasapi2.utils.LinkHeaders in project instructure-android by instructure.
the class InboxManager_Test method deleteMessages.
public static void deleteMessages(long conversationId, List<Long> messageIds, StatusCallback<Conversation> callback) {
// TODO:
Response rawResponse = new Response.Builder().code(200).message("todo").protocol(Protocol.HTTP_1_0).body(ResponseBody.create(MediaType.parse("application/json"), "todo".getBytes())).addHeader("content-type", "application/json").build();
Conversation conversation = new Conversation();
retrofit2.Response<Conversation> response = retrofit2.Response.success(conversation, rawResponse);
callback.onResponse(response, new LinkHeaders(), ApiType.CACHE);
}
use of com.instructure.canvasapi2.utils.LinkHeaders in project instructure-android by instructure.
the class InboxManager_Test method getConversationsFiltered.
public static void getConversationsFiltered(@NonNull InboxApi.Scope scope, @NonNull String canvasContextFilter, @NonNull RestBuilder adapter, @NonNull StatusCallback<List<Conversation>> callback, @NonNull RestParams params) {
// TODO:
Response response = new Response.Builder().code(200).message("todo").protocol(Protocol.HTTP_1_0).body(ResponseBody.create(MediaType.parse("application/json"), "todo".getBytes())).addHeader("content-type", "application/json").build();
List<Conversation> conversations = new ArrayList<>();
retrofit2.Response<List<Conversation>> response1 = retrofit2.Response.success(conversations, response);
callback.onResponse(response1, new LinkHeaders(), ApiType.CACHE);
}
use of com.instructure.canvasapi2.utils.LinkHeaders in project instructure-android by instructure.
the class InboxManager_Test method updateConversation.
public static void updateConversation(long conversationId, Conversation.WorkflowState workflowState, Boolean starred, StatusCallback<Conversation> callback) {
// TODO:
Response rawResponse = new Response.Builder().code(200).message("todo").protocol(Protocol.HTTP_1_0).body(ResponseBody.create(MediaType.parse("application/json"), "todo".getBytes())).addHeader("content-type", "application/json").build();
Conversation conversation = new Conversation();
retrofit2.Response<Conversation> response = retrofit2.Response.success(conversation, rawResponse);
callback.onResponse(response, new LinkHeaders(), ApiType.CACHE);
}
Aggregations