Last active
January 5, 2021 17:20
-
-
Save magdamiu/4cb35a8b883434cf0ba45171a4584ba0 to your computer and use it in GitHub Desktop.
User class
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Gradle dependencies | |
implementation 'com.squareup.retrofit2:retrofit:2.9.0' | |
implementation 'com.squareup.retrofit2:converter-gson:2.9.0' | |
compileOptions { | |
sourceCompatibility JavaVersion.VERSION_1_8 | |
targetCompatibility JavaVersion.VERSION_1_8 | |
} | |
public class User { | |
@SerializedName("login") | |
private String name; | |
public User(String name) { | |
this.name = name; | |
} | |
public String getUser() { | |
return name; | |
} | |
public void setUser(String name) { | |
this.name = name; | |
} | |
@Override | |
public String toString() { | |
return "User{" + | |
"name='" + name + '\'' + | |
'}'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment