use of com.instructure.canvasapi2.models.Favorite in project instructure-android by instructure.
the class GroupManager method removeGroupFromFavorites.
public static void removeGroupFromFavorites(long groupId, StatusCallback<Favorite> callback) {
if (isTesting() || mTesting) {
// TODO
} else {
final RestParams params = new RestParams.Builder().withPerPageQueryParam(false).withShouldIgnoreToken(false).build();
final RestBuilder adapter = new RestBuilder(callback);
GroupAPI.removeGroupFromFavorites(adapter, callback, params, groupId);
}
}
use of com.instructure.canvasapi2.models.Favorite in project instructure-android by instructure.
the class CourseManager_Test method addCourseToFavorites.
public static void addCourseToFavorites(long courseId, StatusCallback<Favorite> callback) {
// TODO:
Response response = new Response.Builder().request(new Request.Builder().url("https://test.com").build()).code(200).message("favorite" + " " + courseId).protocol(Protocol.HTTP_1_0).body(ResponseBody.create(MediaType.parse("application/json"), "favorite".getBytes())).addHeader("content-type", "application/json").build();
Favorite favorite = new Favorite();
retrofit2.Response<Favorite> response1 = retrofit2.Response.success(favorite, response);
callback.onResponse(response1, new LinkHeaders(), ApiType.CACHE);
}
Aggregations