patreon: show all patrons

Signed-off-by: Christine Dodrill <me@christine.website>
This commit is contained in:
Cadey Ratio 2021-09-24 12:26:16 -04:00
parent dfe84da074
commit 7bdd2936c2
4 changed files with 251 additions and 260 deletions

504
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -16,6 +16,6 @@ tracing = "0.1"
tracing-futures = "0.2" tracing-futures = "0.2"
[dev-dependencies] [dev-dependencies]
tokio = { version = "1", features = ["macros"] } tokio = { version = "1", features = ["full"] }
envy = "0.4" envy = "0.4"
pretty_env_logger = "0" pretty_env_logger = "0"

View File

@ -13,5 +13,8 @@ async fn main() -> Result<()> {
let pledges = cli.pledges(id).await?; let pledges = cli.pledges(id).await?;
println!("{:#?}", pledges); println!("{:#?}", pledges);
println!("{} patrons", pledges.len());
Ok(()) Ok(())
} }

View File

@ -143,7 +143,7 @@ impl Client {
"{}/oauth2/api/campaigns/{}/pledges", "{}/oauth2/api/campaigns/{}/pledges",
self.base_url, camp_id self.base_url, camp_id
)) ))
.query(&[("include", "patron.null")]) .query(&[("include", "patron.null"), ("page[count]", "100")])
.header( .header(
"Authorization", "Authorization",
format!("Bearer {}", self.creds.access_token), format!("Bearer {}", self.creds.access_token),