RSS Amplifier

Miguel Piedrafita · Apr 10, 2024

Reverse-engineering my 3D printer's API

0
Sign in to vote or save

This page did not load. You can still read it on the original site — the toolbar below keeps your place in the directory.

use bambulab_cloud::cloud::{Client, Region}; let client = Client::login(Region::Europe, "email@example.com", "password").await?; let tasks = client.get_tasks().await?; dbg!(tasks); // [src/main.rs:6] tasks = [ // Task { // id: 67318297, // length: 2783, // weight: 81.66, // cost_time: 6541s, // cover: Url { ... }, // end_time: 2024-04-06T01:51:58Z, // start_time: 2024-04-05T23:56:48Z, //…

use bambulab_cloud::cloud::{Client, Region};
let client = Client::login(Region::Europe, "email@example.com", "password").await?;
let tasks = client.get_tasks().await?;
dbg!(tasks);
// [src/main.rs:6] tasks = [
//   Task {
//      id: 67318297,
//      length: 2783,
//      weight: 81.66,
//      cost_time: 6541s,
//      cover: Url { ... },
//      end_time: 2024-04-06T01:51:58Z,
//      start_time: 2024-04-05T23:56:48Z,
//      design_title: "Cursed Benchys #1",
//      title: "0.24mm layer, 3 walls, 30% infill",
//      ...
//   },
// ]

I recently got a Bambu Lab 3D printer, which of course means I'm constantly checking their app to see the progress of my prints. To make obsessing a little easier, I decided to reverse-engineer the API they use to fetch things like the status or preview images, and build a Rust client for it.

View on GitHub

Read on miguel.build

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.