| Crates.io | blips |
| lib.rs | blips |
| version | 0.1.0 |
| created_at | 2023-09-09 21:25:41.384271+00 |
| updated_at | 2023-09-09 21:25:41.384271+00 |
| description | A client for interacting with the Blips API. |
| homepage | |
| repository | https://github.com/maxdeviant/blips-sdk |
| max_upload_size | |
| id | 968383 |
| size | 176,032 |
An API client for Blips.
You need to have a Blips account in order to authenticate with the Blips API.
Currently signups are restricted, but you can join the waitlist.
Blips does not currently have a dedicated API authentication mechanism, so you'll need to sign in to the Blips web app and grab your Blips session token.
You will need the value from the Cookie header, which will look something like this:
user_session=<USER_SESSION_VALUE>; _chex_session=<CHEX_SESSION_VALUE>
You will also need the value of the X-CSRF-Token header.
Provide both of these values when constructing the BlipsClient:
let session_cookie = SessionCookie::from(env::var("BLIPS_SESSION_COOKIE")?);
let csrf_token = CsrfToken::from(env::var("BLIPS_CSRF_TOKEN")?);
let client = BlipsClient::new(&session_cookie, &csrf_token);
Once you've constructed a BlipsClient you can
let me = client
.me(blips::graphql::me::Variables {})
.await?
.me
.ok_or_else(|| anyhow!("Failed to execute `me`"))?;
println!("Signed in as {}", me.email);