1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
// Generated by basecamp-sdk-generator from openapi.json and behavior-model.json. DO NOT EDIT.
//! BubbleUps operations.
#![allow(
clippy::too_many_arguments,
clippy::wildcard_imports,
clippy::doc_markdown
)]
use crate::client::AccountClient;
use crate::error::Error;
use crate::generated::routes;
#[allow(unused_imports)]
use crate::generated::types::*;
/// `BubbleUps` operations, sent through one [`AccountClient`].
#[derive(Debug, Clone, Copy)]
pub struct BubbleUpsService<'a> {
client: &'a AccountClient,
}
impl<'a> BubbleUpsService<'a> {
pub(crate) fn new(client: &'a AccountClient) -> Self {
Self { client }
}
/// The client this service sends through.
pub fn client(&self) -> &'a AccountClient {
self.client
}
/// Bubble up a recording for the current user, resurfacing it in the current
/// user's readings (the BC5 successor to "save"). Returns 204 No Content with
/// no body.
///
/// The `at` field controls timing. Send `"now"` to bubble up immediately, or a
/// scheduling keyword (`"today"`, `"tomorrow"`, `"weekend"`, `"next_week"`) or
/// an ISO8601 date (e.g. `"2026-09-10"`) to schedule it to resurface later.
/// NOTE: bc3 currently requires `at` — omitting it raises on the server
/// (`Date.iso8601(nil)`), so send `"now"` for the immediate case. The field is
/// modeled optional (not `@required`) so a future bc3 default (`params\[:at\] ||=
/// "now"`) makes omission mean "now" without an SDK change.
///
/// Idempotent: bubbling up an already-bubbled recording is set-membership and
/// still returns 204.
///
/// `POST /recordings/{recordingId}/bubble_up.json` — idempotent; retries up to 3 attempt(s) on 429, 503.
pub async fn create_bubble_up(
&self,
recording_id: i64,
body: &CreateBubbleUpRequestContent,
) -> Result<(), Error> {
let mut operation = self
.client
.operation(&routes::CREATE_BUBBLE_UP, &[&recording_id]);
operation.json(body)?;
self.client.send_unit(operation).await
}
/// Remove the current user's bubble-up from a recording (returns 204 No Content).
/// Idempotent: popping an absent bubble-up also returns 204.
///
/// `DELETE /recordings/{recordingId}/bubble_up.json` — idempotent; retries up to 3 attempt(s) on 429, 503.
pub async fn delete_bubble_up(&self, recording_id: i64) -> Result<(), Error> {
let operation = self
.client
.operation(&routes::DELETE_BUBBLE_UP, &[&recording_id]);
self.client.send_unit(operation).await
}
}