pub struct Boxes<'a> { /* private fields */ }Implementations§
Source§impl<'a> Boxes<'a>
impl<'a> Boxes<'a>
Sourcepub async fn create_group(
&self,
box_id: i64,
body: &CreateBoxGroupRequestContent,
) -> Result<CreateBoxGroupResponseContent, Error>
pub async fn create_group( &self, box_id: i64, body: &CreateBoxGroupRequestContent, ) -> Result<CreateBoxGroupResponseContent, Error>
Create a Set Aside group out of a selection of postings.
This endpoint does not split a comma-joined posting_ids string — send an array.
Sourcepub async fn delete_group(
&self,
box_id: i64,
group_id: i64,
) -> Result<(), Error>
pub async fn delete_group( &self, box_id: i64, group_id: i64, ) -> Result<(), Error>
Break up a Set Aside group, moving its postings back to Previously Seen
Sourcepub async fn get(
&self,
box_id: i64,
params: &GetBoxParams,
) -> Result<Page<GetBoxResponseContent>, Error>
pub async fn get( &self, box_id: i64, params: &GetBoxParams, ) -> Result<Page<GetBoxResponseContent>, Error>
Get a specific box
Sourcepub async fn get_asidebox(
&self,
params: &GetAsideboxParams,
) -> Result<GetAsideboxResponseContent, Error>
pub async fn get_asidebox( &self, params: &GetAsideboxParams, ) -> Result<GetAsideboxResponseContent, Error>
Get the Set Aside box
Sourcepub async fn get_bubblebox(
&self,
params: &GetBubbleboxParams,
) -> Result<GetBubbleboxResponseContent, Error>
pub async fn get_bubblebox( &self, params: &GetBubbleboxParams, ) -> Result<GetBubbleboxResponseContent, Error>
Get the Bubble Up box
Sourcepub async fn get_feedbox(
&self,
params: &GetFeedboxParams,
) -> Result<GetFeedboxResponseContent, Error>
pub async fn get_feedbox( &self, params: &GetFeedboxParams, ) -> Result<GetFeedboxResponseContent, Error>
Get the Feed
Sourcepub async fn get_group(
&self,
box_id: i64,
group_id: i64,
params: &GetBoxGroupParams,
) -> Result<Page<GetBoxGroupResponseContent>, Error>
pub async fn get_group( &self, box_id: i64, group_id: i64, params: &GetBoxGroupParams, ) -> Result<Page<GetBoxGroupResponseContent>, Error>
Read one Set Aside group with the postings in it.
The postings are paged like a folder’s: newest observed first, 30 to a page, with the next page in the Link header and the total in X-Total-Count.
Sourcepub async fn get_imbox(
&self,
params: &GetImboxParams,
) -> Result<GetImboxResponseContent, Error>
pub async fn get_imbox( &self, params: &GetImboxParams, ) -> Result<GetImboxResponseContent, Error>
Get the Imbox
Sourcepub async fn get_imbox_seen(
&self,
params: &GetImboxSeenParams,
) -> Result<GetImboxSeenResponseContent, Error>
pub async fn get_imbox_seen( &self, params: &GetImboxSeenParams, ) -> Result<GetImboxSeenResponseContent, Error>
Get the Imbox’s Previously Seen postings
Sourcepub async fn get_laterbox(
&self,
params: &GetLaterboxParams,
) -> Result<GetLaterboxResponseContent, Error>
pub async fn get_laterbox( &self, params: &GetLaterboxParams, ) -> Result<GetLaterboxResponseContent, Error>
Get the Reply Later box
Sourcepub async fn get_trailbox(
&self,
params: &GetTrailboxParams,
) -> Result<GetTrailboxResponseContent, Error>
pub async fn get_trailbox( &self, params: &GetTrailboxParams, ) -> Result<GetTrailboxResponseContent, Error>
Get the Paper Trail
Sourcepub async fn list_groups(
&self,
box_id: i64,
) -> Result<ListBoxGroupsResponseContent, Error>
pub async fn list_groups( &self, box_id: i64, ) -> Result<ListBoxGroupsResponseContent, Error>
List the Set Aside groups in a box
Source§impl Boxes<'_>
impl Boxes<'_>
Sourcepub async fn id_by_kind(&self, kind: BoxKind) -> Result<i64, Error>
pub async fn id_by_kind(&self, kind: BoxKind) -> Result<i64, Error>
The id of the box of a kind.
The client reads the box index once and answers every kind from that reading for as
long as it lives — a box’s kind does not change, and the ids do not either. A client
derived with Client::for_account reads it again for
the account it presents. Use Boxes::kinds to read the index afresh.
A kind the account has no box for is still a failure, and the index is not read again to be sure. Go re-reads it on every such miss, which is a read per call for a kind that will never be there.
Sourcepub async fn kinds(&self) -> Result<BoxKinds, Error>
pub async fn kinds(&self) -> Result<BoxKinds, Error>
Reads the box index and maps every box’s kind to its id. This is the read itself, so it goes to HEY however many times it is called.
Sourcepub async fn create_box_group(
&self,
box_id: i64,
posting_ids: &[i64],
) -> Result<CreateBoxGroupResponseContent, Error>
pub async fn create_box_group( &self, box_id: i64, posting_ids: &[i64], ) -> Result<CreateBoxGroupResponseContent, Error>
Gathers a selection of postings into a new Set Aside group. The generated
Boxes::create_group takes the same request as a body.