Search in sources :

Example 6 with ParentResponse

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

the class UserManager method authenticateParentAirwolf.

public static void authenticateParentAirwolf(String airwolfDomain, String email, String password, StatusCallback<ParentResponse> callback) {
    if (isTesting() || mTesting) {
        RestBuilder adapter = new RestBuilder(callback);
        RestParams params = new RestParams.Builder().withShouldIgnoreToken(false).withPerPageQueryParam(false).withDomain(airwolfDomain).withAPIVersion("").withForceReadFromNetwork(true).build();
        UserManager_Test.authenticateParentAirwolf(airwolfDomain, adapter, params, email, password, callback);
    } else {
        RestBuilder adapter = new RestBuilder(callback);
        RestParams params = new RestParams.Builder().withShouldIgnoreToken(false).withPerPageQueryParam(false).withDomain(airwolfDomain).withAPIVersion("").withForceReadFromNetwork(true).build();
        UserAPI.authenticateParentAirwolf(adapter, params, email, password, callback);
    }
}
Also used : RestParams(com.instructure.canvasapi2.builders.RestParams) RestBuilder(com.instructure.canvasapi2.builders.RestBuilder) RestBuilder(com.instructure.canvasapi2.builders.RestBuilder)

Example 7 with ParentResponse

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

the class UserManager method addParentAirwolf.

public static void addParentAirwolf(String airwolfDomain, Parent parent, StatusCallback<ParentResponse> callback) {
    if (isTesting() || mTesting) {
        RestBuilder adapter = new RestBuilder(callback);
        RestParams params = new RestParams.Builder().withShouldIgnoreToken(false).withPerPageQueryParam(false).withDomain(airwolfDomain).withAPIVersion("").withForceReadFromNetwork(true).build();
        UserManager_Test.addParentAirwolf(airwolfDomain, adapter, params, parent, callback);
    } else {
        RestBuilder adapter = new RestBuilder(callback);
        RestParams params = new RestParams.Builder().withShouldIgnoreToken(false).withPerPageQueryParam(false).withDomain(airwolfDomain).withAPIVersion("").withForceReadFromNetwork(true).build();
        UserAPI.addParentAirwolf(adapter, params, parent, callback);
    }
}
Also used : RestParams(com.instructure.canvasapi2.builders.RestParams) RestBuilder(com.instructure.canvasapi2.builders.RestBuilder) RestBuilder(com.instructure.canvasapi2.builders.RestBuilder)

Example 8 with ParentResponse

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

the class UserManager method authenticateCanvasParentAirwolf.

public static void authenticateCanvasParentAirwolf(String airwolfDomain, String domain, StatusCallback<ParentResponse> callback) {
    if (isTesting() || mTesting) {
        RestBuilder adapter = new RestBuilder(callback);
        RestParams params = new RestParams.Builder().withShouldIgnoreToken(false).withPerPageQueryParam(false).withDomain(airwolfDomain).withAPIVersion("").withForceReadFromNetwork(true).build();
        UserManager_Test.authenticateCanvasParentAirwolf(domain, adapter, params, callback);
    } else {
        RestBuilder adapter = new RestBuilder(callback);
        RestParams params = new RestParams.Builder().withShouldIgnoreToken(false).withPerPageQueryParam(false).withDomain(airwolfDomain).withAPIVersion("").withForceReadFromNetwork(true).build();
        UserAPI.authenticateCavnasParentAirwolf(adapter, params, domain, callback);
    }
}
Also used : RestParams(com.instructure.canvasapi2.builders.RestParams) RestBuilder(com.instructure.canvasapi2.builders.RestBuilder) RestBuilder(com.instructure.canvasapi2.builders.RestBuilder)

Aggregations

RestBuilder (com.instructure.canvasapi2.builders.RestBuilder)6 RestParams (com.instructure.canvasapi2.builders.RestParams)3 ParentResponse (com.instructure.canvasapi2.models.ParentResponse)3 LinkHeaders (com.instructure.canvasapi2.utils.LinkHeaders)3 Response (okhttp3.Response)3 Parent (com.instructure.canvasapi2.models.Parent)1 ParentWrapper (com.instructure.canvasapi2.models.ParentWrapper)1 ResetParent (com.instructure.canvasapi2.models.ResetParent)1