Skip to main content

CardsService

Struct CardsService 

Source
pub struct CardsService<'a> { /* private fields */ }
Expand description

The Cards operations.

Implementations§

Source§

impl<'a> CardsService<'a>

Source

pub fn scope(&self) -> &Scope<'a>

The client and account these operations send through.

Source

pub async fn assign( &self, card_number: i32, body: &AssignCardRequestContent, ) -> Result<(), Error>

AssignCard — POST /{accountId}/cards/{cardNumber}/assignments.json.

Sent once and never resent.

Source

pub async fn close(&self, card_number: i32) -> Result<(), Error>

CloseCard — POST /{accountId}/cards/{cardNumber}/closure.json.

Sent up to 3 times, backing off from 1000 ms, when the answer is 429, 500 or 503. Idempotent, so a resend is safe.

Source

pub async fn create( &self, body: &CreateCardRequestContent, ) -> Result<Card, Error>

CreateCard — POST /{accountId}/cards.json.

Sent once and never resent.

Source

pub async fn delete(&self, card_number: i32) -> Result<(), Error>

DeleteCard — DELETE /{accountId}/cards/{cardNumber}.

Sent up to 3 times, backing off from 1000 ms, when the answer is 429, 500 or 503.

Source

pub async fn delete_image(&self, card_number: i32) -> Result<(), Error>

DeleteCardImage — DELETE /{accountId}/cards/{cardNumber}/image.json.

Sent up to 3 times, backing off from 1000 ms, when the answer is 429, 500 or 503.

Source

pub async fn get(&self, card_number: i32) -> Result<Card, Error>

GetCard — GET /{accountId}/cards/{cardNumber}.

Sent up to 3 times, backing off from 1000 ms, when the answer is 429, 500 or 503.

Source

pub async fn gold(&self, card_number: i32) -> Result<(), Error>

GoldCard — POST /{accountId}/cards/{cardNumber}/goldness.json.

Sent up to 3 times, backing off from 1000 ms, when the answer is 429, 500 or 503. Idempotent, so a resend is safe.

Source

pub async fn list( &self, params: &ListCardsParams, ) -> Result<Page<Vec<Card>>, Error>

ListCards — GET /{accountId}/cards.json.

Sent up to 3 times, backing off from 1000 ms, when the answer is 429, 500 or 503.

Paginated: the answer is a page with page as its cursor, and the next one is read with next_page.

Source

pub async fn list_activities( &self, params: &ListActivitiesParams, ) -> Result<Page<Vec<Activity>>, Error>

ListActivities — GET /{accountId}/activities.json.

Sent up to 3 times, backing off from 1000 ms, when the answer is 429, 500 or 503.

Paginated: the answer is a page with page as its cursor, and the next one is read with next_page.

Source

pub async fn list_column_cards( &self, board_id: &str, column_id: &str, ) -> Result<Page<Vec<Card>>, Error>

ListColumnCards — GET /{accountId}/boards/{boardId}/columns/{columnId}/cards.json.

Sent up to 3 times, backing off from 1000 ms, when the answer is 429, 500 or 503.

Paginated: the answer is a page with page as its cursor, and the next one is read with next_page.

Source

pub async fn mark_read(&self, card_number: i32) -> Result<(), Error>

MarkCardRead — POST /{accountId}/cards/{cardNumber}/reading.json.

Sent up to 3 times, backing off from 1000 ms, when the answer is 429, 500 or 503. Idempotent, so a resend is safe.

Source

pub async fn mark_unread(&self, card_number: i32) -> Result<(), Error>

MarkCardUnread — DELETE /{accountId}/cards/{cardNumber}/reading.json.

Sent up to 3 times, backing off from 1000 ms, when the answer is 429, 500 or 503.

Source

pub async fn move_to_board( &self, card_number: i32, body: &MoveCardRequestContent, ) -> Result<Card, Error>

MoveCard — PATCH /{accountId}/cards/{cardNumber}/board.json.

Sent up to 3 times, backing off from 1000 ms, when the answer is 429, 500 or 503.

Source

pub async fn pin(&self, card_number: i32) -> Result<(), Error>

PinCard — POST /{accountId}/cards/{cardNumber}/pin.json.

Sent up to 3 times, backing off from 1000 ms, when the answer is 429, 500 or 503. Idempotent, so a resend is safe.

Source

pub async fn postpone(&self, card_number: i32) -> Result<(), Error>

PostponeCard — POST /{accountId}/cards/{cardNumber}/not_now.json.

Sent up to 3 times, backing off from 1000 ms, when the answer is 429, 500 or 503. Idempotent, so a resend is safe.

Source

pub async fn publish(&self, card_number: i32) -> Result<(), Error>

PublishCard — POST /{accountId}/cards/{cardNumber}/publish.json.

Sent once and never resent.

Source

pub async fn reopen(&self, card_number: i32) -> Result<(), Error>

ReopenCard — DELETE /{accountId}/cards/{cardNumber}/closure.json.

Sent up to 3 times, backing off from 1000 ms, when the answer is 429, 500 or 503.

Source

pub async fn self_assign(&self, card_number: i32) -> Result<(), Error>

SelfAssignCard — POST /{accountId}/cards/{cardNumber}/self_assignment.json.

Sent once and never resent.

Source

pub async fn tag( &self, card_number: i32, body: &TagCardRequestContent, ) -> Result<(), Error>

TagCard — POST /{accountId}/cards/{cardNumber}/taggings.json.

Sent once and never resent.

Source

pub async fn triage( &self, card_number: i32, body: &TriageCardRequestContent, ) -> Result<(), Error>

TriageCard — POST /{accountId}/cards/{cardNumber}/triage.json.

Sent up to 3 times, backing off from 1000 ms, when the answer is 429, 500 or 503. Idempotent, so a resend is safe.

Source

pub async fn un_triage(&self, card_number: i32) -> Result<(), Error>

UnTriageCard — DELETE /{accountId}/cards/{cardNumber}/triage.json.

Sent up to 3 times, backing off from 1000 ms, when the answer is 429, 500 or 503.

Source

pub async fn ungold(&self, card_number: i32) -> Result<(), Error>

UngoldCard — DELETE /{accountId}/cards/{cardNumber}/goldness.json.

Sent up to 3 times, backing off from 1000 ms, when the answer is 429, 500 or 503.

Source

pub async fn unpin(&self, card_number: i32) -> Result<(), Error>

UnpinCard — DELETE /{accountId}/cards/{cardNumber}/pin.json.

Sent up to 3 times, backing off from 1000 ms, when the answer is 429, 500 or 503.

Source

pub async fn unwatch(&self, card_number: i32) -> Result<(), Error>

UnwatchCard — DELETE /{accountId}/cards/{cardNumber}/watch.json.

Sent up to 3 times, backing off from 1000 ms, when the answer is 429, 500 or 503.

Source

pub async fn update( &self, card_number: i32, body: &UpdateCardRequestContent, ) -> Result<Card, Error>

UpdateCard — PATCH /{accountId}/cards/{cardNumber}.

Sent up to 3 times, backing off from 1000 ms, when the answer is 429, 500 or 503.

Source

pub async fn watch(&self, card_number: i32) -> Result<(), Error>

WatchCard — POST /{accountId}/cards/{cardNumber}/watch.json.

Sent up to 3 times, backing off from 1000 ms, when the answer is 429, 500 or 503. Idempotent, so a resend is safe.

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for CardsService<'a>

§

impl<'a> !UnwindSafe for CardsService<'a>

§

impl<'a> Freeze for CardsService<'a>

§

impl<'a> Send for CardsService<'a>

§

impl<'a> Sync for CardsService<'a>

§

impl<'a> Unpin for CardsService<'a>

§

impl<'a> UnsafeUnpin for CardsService<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more