Search in sources :

Example 1 with AssignmentPostBodyWrapper

use of com.instructure.canvasapi2.models.post_models.AssignmentPostBodyWrapper in project instructure-android by instructure.

the class AssignmentManager method editAssignmentAllowNullValues.

public static void editAssignmentAllowNullValues(long courseId, long assignmentId, AssignmentPostBody body, final StatusCallback<Assignment> callback) {
    if (isTesting() || mTesting) {
        AssignmentManager_Test.editAssignment(body, callback);
    } else {
        RestBuilder adapter = new RestBuilder(callback);
        RestParams params = new RestParams.Builder().withPerPageQueryParam(false).withShouldIgnoreToken(false).build();
        AssignmentPostBodyWrapper bodyWrapper = new AssignmentPostBodyWrapper();
        bodyWrapper.setAssignment(body);
        AssignmentAPI.editAssignmentAllowNullValues(courseId, assignmentId, bodyWrapper, adapter, callback, params);
    }
}
Also used : RestParams(com.instructure.canvasapi2.builders.RestParams) AssignmentPostBodyWrapper(com.instructure.canvasapi2.models.post_models.AssignmentPostBodyWrapper) RestBuilder(com.instructure.canvasapi2.builders.RestBuilder)

Example 2 with AssignmentPostBodyWrapper

use of com.instructure.canvasapi2.models.post_models.AssignmentPostBodyWrapper in project instructure-android by instructure.

the class AssignmentManager method editAssignment.

public static void editAssignment(long courseId, long assignmentId, AssignmentPostBody body, final StatusCallback<Assignment> callback, boolean serializeNulls) {
    if (isTesting() || mTesting) {
        AssignmentManager_Test.editAssignment(body, callback);
    } else {
        RestBuilder adapter = new RestBuilder(callback);
        RestParams params = new RestParams.Builder().withPerPageQueryParam(false).withShouldIgnoreToken(false).build();
        AssignmentPostBodyWrapper bodyWrapper = new AssignmentPostBodyWrapper();
        bodyWrapper.setAssignment(body);
        AssignmentAPI.editAssignment(courseId, assignmentId, bodyWrapper, adapter, callback, params, serializeNulls);
    }
}
Also used : RestParams(com.instructure.canvasapi2.builders.RestParams) AssignmentPostBodyWrapper(com.instructure.canvasapi2.models.post_models.AssignmentPostBodyWrapper) RestBuilder(com.instructure.canvasapi2.builders.RestBuilder)

Aggregations

RestBuilder (com.instructure.canvasapi2.builders.RestBuilder)2 RestParams (com.instructure.canvasapi2.builders.RestParams)2 AssignmentPostBodyWrapper (com.instructure.canvasapi2.models.post_models.AssignmentPostBodyWrapper)2