| Crates.io | appstoreconnect |
| lib.rs | appstoreconnect |
| version | 0.2.2 |
| created_at | 2023-01-30 12:01:46.635025+00 |
| updated_at | 2026-01-05 01:04:21.732427+00 |
| description | appstoreconnect client |
| homepage | |
| repository | https://github.com/niuhuan/appstoreconnect-rs |
| max_upload_size | |
| id | 771731 |
| size | 143,842 |
This repository is an AppStoreConnect api client, allow your invoke api in Rust. The full api docs
in here.
First. You need request Issuer ID, KeyId and Key in the website : https://appstoreconnect.apple.com/access/api.
Adding appstoreconnect
Run this command in your terminal to add the latest version of appstoreconnect.
$ cargo add appstoreconnect
build and use the client
iss : Issuer ID
kid : KeyId
ec_der : base64 text in key.p8 remove \n
#[tokio::main]
async fn main() -> Result<()> {
let iss = std::env::var("APPSTORECONNECT_ISS")?;
let kid = std::env::var("APPSTORECONNECT_KID")?;
let ec_der_b64 = std::env::var("APPSTORECONNECT_EC_DER_BASE64")?;
// create client
let client = ClientBuilder::default()
.with_iss(iss)
.with_kid(kid)
.with_ec_der(base64::decode(ec_der_b64)?)
.build()?;
// get find devices
let devices = client.devices(DeviceQuery {
filter_name: Some("mini".to_string()),
..Default::default()
}).await?;
Ok(())
}
Escape-hatch (raw request) and paging
use appstoreconnect::query::Query;
// any endpoint / any query params
let apps: appstoreconnect::entities::PageResponse<appstoreconnect::entities::App> =
client
.raw()
.get("/v1/apps")
.query(Query::new().fields("apps", ["name", "bundleId"]).page_limit(50))
.send_json()
.await?;
// auto follow `links.next`
let mut pager = apps.pager(&client);
while let Some(page) = pager.next_page().await? {
for app in page.data {
println!("{}", app.attributes.bundle_id);
}
}
More example : Create or list profile, certs, bundleIds please visit src/tests.rs