Skip to content

Commit

Permalink
changing logo property names
Browse files Browse the repository at this point in the history
  • Loading branch information
BrentonPoke committed Mar 7, 2020
1 parent 6638ae4 commit bb63949
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
6 changes: 5 additions & 1 deletion src/main/java/com/toornament/model/Group.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.toornament.model;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import java.util.List;
Expand All @@ -15,7 +16,10 @@
@JsonInclude(JsonInclude.Include.NON_NULL)
@EqualsAndHashCode
public class Group {
private String id, stage_id, name;
private String id;
@JsonProperty("stage_id")
private String stageID;
private String name;
private Integer number;
private Boolean closed;
private Settings settings;
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/com/toornament/model/Logo.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
public class Logo {

@JsonAlias({"logo_small","icon_small"})
private String logo_small;
private String logoSmall;
@JsonAlias({"logo_medium","icon_medium"})
private String logo_medium;
private String logoMedium;
@JsonAlias({"logo_large","icon_large"})
private String logo_large;
private String logoLarge;
private String original;
@Override
public String toString() {
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/GroupsTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ public void getGroupsV2Test(){
public void getGroupTest(){
Group group = groups.getGroup("986865420542550016");
assertTrue(group.getNumber() == 1);
assertTrue(group.getStage_id().matches("906330006561030144"));
assertTrue(group.getStageID().matches("906330006561030144"));
}
}

0 comments on commit bb63949

Please sign in to comment.