Search in sources :

Example 6 with ProfileModel

use of org.edx.mobile.model.api.ProfileModel in project edx-app-android by edx.

the class SocialLoginTests method testGetProfile.

@Test
public void testGetProfile() throws Exception {
    ProfileModel profile = loginAPI.getProfile();
    assertNotNull(profile);
    assertNotNull("profile.email cannot be null", profile.email);
    print("finished getProfile");
}
Also used : ProfileModel(org.edx.mobile.model.api.ProfileModel) Test(org.junit.Test)

Example 7 with ProfileModel

use of org.edx.mobile.model.api.ProfileModel in project edx-app-android by edx.

the class LoginAPI method getProfile.

@NonNull
public ProfileModel getProfile() throws Exception {
    ProfileModel data = executeStrict(loginService.getProfile());
    loginPrefs.storeUserProfile(data);
    return data;
}
Also used : ProfileModel(org.edx.mobile.model.api.ProfileModel) NonNull(android.support.annotation.NonNull)

Aggregations

ProfileModel (org.edx.mobile.model.api.ProfileModel)7 Context (android.content.Context)2 NonNull (android.support.annotation.NonNull)1 Nullable (android.support.annotation.Nullable)1 View (android.view.View)1 ImageView (android.widget.ImageView)1 TextView (android.widget.TextView)1 File (java.io.File)1 IOException (java.io.IOException)1 ProfileImage (org.edx.mobile.user.ProfileImage)1 Test (org.junit.Test)1