blips

Crates.ioblips
lib.rsblips
version0.1.0
sourcesrc
created_at2023-09-09 21:25:41.384271
updated_at2023-09-09 21:25:41.384271
descriptionA client for interacting with the Blips API.
homepage
repositoryhttps://github.com/maxdeviant/blips-sdk
max_upload_size
id968383
size176,032
Marshall Bowers (maxdeviant)

documentation

https://docs.rs/blips/

README

blips

An API client for Blips.

Prerequisites

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.

Authentication

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);

Usage

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);
Commit count: 18

cargo fmt