A heckin ton. Mostly hackish

This commit is contained in:
Gnarwhal 2021-02-16 14:11:12 -05:00
parent 052052d76b
commit b229ff9a15
Signed by: Gnarwhal
GPG key ID: 0989A73D8C421174
70 changed files with 2226 additions and 881 deletions

View file

@ -0,0 +1,17 @@
package achievements.data;
import com.fasterxml.jackson.annotation.JsonProperty;
public class APPostRequest {
@JsonProperty("key")
private String key;
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
}

View file

@ -7,37 +7,53 @@ import java.util.List;
public class Profile {
public static class Query {
@JsonProperty("username")
private StringFilter string;
public static class Platform {
@JsonProperty
private int id;
@JsonProperty("name")
private String name;
@JsonProperty("connected")
private boolean connected;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public boolean getConnected() {
return connected;
}
public void setConnected(boolean connected) {
this.connected = connected;
}
}
@JsonProperty("id")
private int id;
@JsonProperty("username")
private String username;
@JsonProperty("plaforms")
private List<String> platforms;
@JsonProperty("games")
private List<Game> games;
@JsonProperty("achievements")
private List<Achievement> achievements;
public Profile(int id, String username, List<String> platforms, List<Game> games, List<Achievement> achievements) {
this.id = id;
this.username = username;
this.platforms = platforms;
this.games = games;
this.achievements = achievements;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
@JsonProperty("completed")
private int completed;
@JsonProperty("average")
private Integer average;
@JsonProperty("perfect")
private int perfect;
@JsonProperty("noteworthy")
private List<Achievement> noteworthy;
@JsonProperty("platforms")
private List<Platform> platforms;
/*@JsonProperty("ratings")
private List<Rating> ratings;*/
public String getUsername() {
return username;
@ -47,27 +63,43 @@ public class Profile {
this.username = username;
}
public List<String> getPlatforms() {
public int getCompleted() {
return completed;
}
public void setCompleted(int completed) {
this.completed = completed;
}
public Integer getAverage() {
return average;
}
public void setAverage(Integer average) {
this.average = average;
}
public int getPerfect() {
return perfect;
}
public void setPerfect(int perfect) {
this.perfect = perfect;
}
public List<Achievement> getNoteworthy() {
return noteworthy;
}
public void setNoteworthy(List<Achievement> noteworthy) {
this.noteworthy = noteworthy;
}
public List<Platform> getPlatforms() {
return platforms;
}
public void setPlatforms(List<String> platforms) {
public void setPlatforms(List<Platform> platforms) {
this.platforms = platforms;
}
public List<Game> getGames() {
return games;
}
public void setGames(List<Game> games) {
this.games = games;
}
public List<Achievement> getAchievements() {
return achievements;
}
public void setAchievements(List<Achievement> achievements) {
this.achievements = achievements;
}
}

View file

@ -1,5 +1,6 @@
package achievements.data;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
public class Session {
@ -10,11 +11,14 @@ public class Session {
private int id;
@JsonProperty("hue")
private int hue;
@JsonIgnore
private boolean used;
public Session(String key, int id, int hue) {
this.key = key;
this.id = id;
this.hue = hue;
this.key = key;
this.id = id;
this.hue = hue;
this.used = false;
}
public String getKey() {
@ -40,4 +44,12 @@ public class Session {
public void setHue(int hue) {
this.hue = hue;
}
public boolean getUsed() {
return used;
}
public void setUsed(boolean used) {
this.used = used;
}
}

View file

@ -0,0 +1,36 @@
package achievements.data.query;
import com.fasterxml.jackson.annotation.JsonProperty;
public class AddPlatformRequest {
@JsonProperty("sessionKey")
private String sessionKey;
@JsonProperty("platformId")
private int platformId;
@JsonProperty("platformUserId")
private String platformUserId;
public String getSessionKey() {
return sessionKey;
}
public void setSessionKey(String sessionKey) {
this.sessionKey = sessionKey;
}
public int getPlatformId() {
return platformId;
}
public void setPlatformId(int platformId) {
this.platformId = platformId;
}
public String getPlatformUserId() {
return platformUserId;
}
public void setPlatformUserId(String platformUserId) {
this.platformUserId = platformUserId;
}
}

View file

@ -0,0 +1,26 @@
package achievements.data.query;
import com.fasterxml.jackson.annotation.JsonProperty;
public class RemovePlatformRequest {
@JsonProperty("sessionKey")
private String sessionKey;
@JsonProperty("platformId")
private int platformId;
public String getSessionKey() {
return sessionKey;
}
public void setSessionKey(String sessionKey) {
this.sessionKey = sessionKey;
}
public int getPlatformId() {
return platformId;
}
public void setPlatformId(int platformId) {
this.platformId = platformId;
}
}

View file

@ -0,0 +1,36 @@
package achievements.data.query;
import com.fasterxml.jackson.annotation.JsonProperty;
public class SetUsername {
@JsonProperty("sessionKey")
private String sessionKey;
@JsonProperty("userId")
private int userId;
@JsonProperty("username")
private String username;
public String getSessionKey() {
return sessionKey;
}
public void setSessionKey(String sessionKey) {
this.sessionKey = sessionKey;
}
public int getUserId() {
return userId;
}
public void setUserId(int userId) {
this.userId = userId;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
}