summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Anshul Gupta <ansg191@anshulg.com> 2024-09-18 15:57:06 -0700
committerGravatar GitHub <noreply@github.com> 2024-09-18 15:57:06 -0700
commite5a9d650e53635fe60d1b61431380f4f23b086c0 (patch)
tree96f5479e525b8efacc4b0ae4be9bc7b8503f61f3 /src
parentdf6751afad40009f52cfc347f84325051764f14a (diff)
parentba7462a39e5b30e8473ed17ac67d27419069b8dd (diff)
downloadpandascore-e5a9d650e53635fe60d1b61431380f4f23b086c0.tar.gz
pandascore-e5a9d650e53635fe60d1b61431380f4f23b086c0.tar.zst
pandascore-e5a9d650e53635fe60d1b61431380f4f23b086c0.zip
Merge pull request #41 from ansg191/fix-player
Diffstat (limited to 'src')
-rw-r--r--src/endpoint/all/players.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/endpoint/all/players.rs b/src/endpoint/all/players.rs
index 8541237..1d6298a 100644
--- a/src/endpoint/all/players.rs
+++ b/src/endpoint/all/players.rs
@@ -7,7 +7,7 @@ use crate::{
endpoint::{
sealed::Sealed, CollectionOptions, EndpointError, ListResponse, PaginatedEndpoint, BASE_URL,
},
- model::{league::League, Identifier},
+ model::{league::League, matches::Match, series::Series, tournament::Tournament, Identifier},
};
crate::endpoint::list_endpoint!(ListPlayers("/players") => crate::model::player::Player);
@@ -54,7 +54,7 @@ pub struct ListPlayerSeries<'a> {
}
impl Sealed for ListPlayerSeries<'_> {
- type Response = ListResponse<League>;
+ type Response = ListResponse<Series>;
fn to_request(self) -> Result<Request, EndpointError> {
let mut url = Url::parse(&format!("{}/players/{}/series", BASE_URL, self.id))?;
@@ -70,7 +70,7 @@ impl Sealed for ListPlayerSeries<'_> {
}
impl PaginatedEndpoint for ListPlayerSeries<'_> {
- type Item = League;
+ type Item = Series;
fn with_options(self, options: CollectionOptions) -> Self {
Self { options, ..self }
@@ -86,7 +86,7 @@ pub struct ListPlayerTournaments<'a> {
}
impl Sealed for ListPlayerTournaments<'_> {
- type Response = ListResponse<League>;
+ type Response = ListResponse<Tournament>;
fn to_request(self) -> Result<Request, EndpointError> {
let mut url = Url::parse(&format!("{}/players/{}/tournaments", BASE_URL, self.id))?;
@@ -102,7 +102,7 @@ impl Sealed for ListPlayerTournaments<'_> {
}
impl PaginatedEndpoint for ListPlayerTournaments<'_> {
- type Item = League;
+ type Item = Tournament;
fn with_options(self, options: CollectionOptions) -> Self {
Self { options, ..self }
@@ -118,7 +118,7 @@ pub struct ListPlayerMatches<'a> {
}
impl Sealed for ListPlayerMatches<'_> {
- type Response = ListResponse<League>;
+ type Response = ListResponse<Match>;
fn to_request(self) -> Result<Request, EndpointError> {
let mut url = Url::parse(&format!("{}/players/{}/matches", BASE_URL, self.id))?;
@@ -134,7 +134,7 @@ impl Sealed for ListPlayerMatches<'_> {
}
impl PaginatedEndpoint for ListPlayerMatches<'_> {
- type Item = League;
+ type Item = Match;
fn with_options(self, options: CollectionOptions) -> Self {
Self { options, ..self }