-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new endpoint /locations/global/rankings/tournaments/{tournamentTa…
…g} (#159) * Add new endpoint /locations/global/rankings/tournaments/{tournamentTag} * Fix pom --------- Co-authored-by: Michael Lieshoff <[email protected]>
- Loading branch information
Showing
13 changed files
with
432 additions
and
8 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v2.1.1 | ||
v2.1.2 |
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
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
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
34 changes: 34 additions & 0 deletions
34
src/main/java/jcrapi2/api/intern/locations/seasons/global/rankings/tournament/Clan.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package jcrapi2.api.intern.locations.seasons.global.rankings.tournament; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
|
||
import lombok.Data; | ||
|
||
@Data | ||
public class Clan { | ||
|
||
@SerializedName("tag") | ||
private String tag; | ||
|
||
@SerializedName("name") | ||
private String name; | ||
|
||
@SerializedName("badgeId") | ||
private long badgeId; | ||
} |
46 changes: 46 additions & 0 deletions
46
...2/api/intern/locations/seasons/global/rankings/tournament/TopPlayerTournamentRanking.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package jcrapi2.api.intern.locations.seasons.global.rankings.tournament; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
|
||
import lombok.Data; | ||
|
||
@Data | ||
public class TopPlayerTournamentRanking { | ||
|
||
@SerializedName("tag") | ||
private String tag; | ||
|
||
@SerializedName("name") | ||
private String name; | ||
|
||
@SerializedName("wins") | ||
private int wins; | ||
|
||
@SerializedName("losses") | ||
private int losses; | ||
|
||
@SerializedName("rank") | ||
private int rank; | ||
|
||
@SerializedName("previousRank") | ||
private int previousRank; | ||
|
||
@SerializedName("clan") | ||
private Clan clan; | ||
} |
56 changes: 56 additions & 0 deletions
56
...tern/locations/seasons/global/rankings/tournament/TopPlayerTournamentRankingsRequest.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package jcrapi2.api.intern.locations.seasons.global.rankings.tournament; | ||
|
||
import jcrapi2.common.PaginationRequest; | ||
|
||
import lombok.Builder; | ||
|
||
import java.util.Map; | ||
|
||
public class TopPlayerTournamentRankingsRequest extends PaginationRequest { | ||
|
||
private final String tournamentTag; | ||
|
||
@Builder | ||
private TopPlayerTournamentRankingsRequest( | ||
int limit, | ||
String after, | ||
String before, | ||
boolean storeRawResponse, | ||
String tournamentTag) { | ||
super(limit, after, before, storeRawResponse); | ||
this.tournamentTag = tournamentTag; | ||
} | ||
|
||
public static TopPlayerTournamentRankingsRequestBuilder builder(String tournamentTag) { | ||
return new TopPlayerTournamentRankingsRequestBuilder().tournamentTag(tournamentTag); | ||
} | ||
|
||
@Override | ||
public Map<String, Object> getRestParameters() { | ||
Map<String, Object> map = super.getRestParameters(); | ||
map.put("tournamentTag", tournamentTag); | ||
return map; | ||
} | ||
|
||
@Override | ||
public Map<String, Object> getQueryParameters() { | ||
Map<String, Object> map = super.getQueryParameters(); | ||
return map; | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
...ern/locations/seasons/global/rankings/tournament/TopPlayerTournamentRankingsResponse.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package jcrapi2.api.intern.locations.seasons.global.rankings.tournament; | ||
|
||
import jcrapi2.common.PaginationResponse; | ||
|
||
public class TopPlayerTournamentRankingsResponse | ||
extends PaginationResponse<TopPlayerTournamentRanking> {} |
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
Oops, something went wrong.