pub struct Signatures {
pub client: Client,
}
Fields§
§client: Client
Implementations§
Source§impl Signatures
impl Signatures
Sourcepub async fn list_teammate<'a>(
&'a self,
teammate_id: &'a str,
) -> Result<ListTeammateSignaturesResponse, Error>
pub async fn list_teammate<'a>( &'a self, teammate_id: &'a str, ) -> Result<ListTeammateSignaturesResponse, Error>
List teammate signatures
List the signatures belonging to the given teammate.
Parameters:
teammate_id: &'astr
: The teammate ID (required)
async fn example_signatures_list_teammate() -> anyhow::Result<()> {
let client = front_api::Client::new_from_env();
let result: front_api::types::ListTeammateSignaturesResponse =
client.signatures().list_teammate("some-string").await?;
println!("{:?}", result);
Ok(())
}
Sourcepub async fn create_teammate<'a>(
&'a self,
teammate_id: &'a str,
body: &CreatePrivateSignature,
) -> Result<SignatureResponse, Error>
pub async fn create_teammate<'a>( &'a self, teammate_id: &'a str, body: &CreatePrivateSignature, ) -> Result<SignatureResponse, Error>
Create teammate signature
Create a new signature for the given teammate
Parameters:
teammate_id: &'astr
: The teammate ID (required)
async fn example_signatures_create_teammate() -> anyhow::Result<()> {
let client = front_api::Client::new_from_env();
let result: front_api::types::SignatureResponse = client
.signatures()
.create_teammate(
"some-string",
&front_api::types::CreatePrivateSignature {
name: "some-string".to_string(),
sender_info: Some("some-string".to_string()),
body: "some-string".to_string(),
is_default: Some(true),
channel_ids: Some(vec!["some-string".to_string()]),
},
)
.await?;
println!("{:?}", result);
Ok(())
}
Sourcepub async fn list_team<'a>(
&'a self,
team_id: &'a str,
) -> Result<ListTeamSignaturesResponse, Error>
pub async fn list_team<'a>( &'a self, team_id: &'a str, ) -> Result<ListTeamSignaturesResponse, Error>
List team signatures
List the signatures belonging to the given team.
Parameters:
team_id: &'astr
: The team ID (required)
async fn example_signatures_list_team() -> anyhow::Result<()> {
let client = front_api::Client::new_from_env();
let result: front_api::types::ListTeamSignaturesResponse =
client.signatures().list_team("some-string").await?;
println!("{:?}", result);
Ok(())
}
Sourcepub async fn create_team<'a>(
&'a self,
team_id: &'a str,
body: &CreateSharedSignature,
) -> Result<SignatureResponse, Error>
pub async fn create_team<'a>( &'a self, team_id: &'a str, body: &CreateSharedSignature, ) -> Result<SignatureResponse, Error>
Create team signature
Create a new signature for the given team
Parameters:
team_id: &'astr
: The teammate ID (required)
async fn example_signatures_create_team() -> anyhow::Result<()> {
let client = front_api::Client::new_from_env();
let result: front_api::types::SignatureResponse = client
.signatures()
.create_team(
"some-string",
&front_api::types::CreateSharedSignature {
name: "some-string".to_string(),
sender_info: Some("some-string".to_string()),
body: "some-string".to_string(),
is_visible_for_all_teammate_channels: Some(true),
is_default: Some(true),
channel_ids: Some(vec!["some-string".to_string()]),
},
)
.await?;
println!("{:?}", result);
Ok(())
}
Sourcepub async fn get<'a>(
&'a self,
signature_id: &'a str,
) -> Result<SignatureResponse, Error>
pub async fn get<'a>( &'a self, signature_id: &'a str, ) -> Result<SignatureResponse, Error>
Get signatures
Get the given signature.
Parameters:
signature_id: &'astr
: The signature ID (required)
async fn example_signatures_get() -> anyhow::Result<()> {
let client = front_api::Client::new_from_env();
let result: front_api::types::SignatureResponse = client.signatures().get("some-string").await?;
println!("{:?}", result);
Ok(())
}
Sourcepub async fn delete<'a>(&'a self, signature_id: &'a str) -> Result<(), Error>
pub async fn delete<'a>(&'a self, signature_id: &'a str) -> Result<(), Error>
Delete signature
Delete signature
Parameters:
signature_id: &'astr
: The signature ID (required)
async fn example_signatures_delete() -> anyhow::Result<()> {
let client = front_api::Client::new_from_env();
client.signatures().delete("some-string").await?;
Ok(())
}
Sourcepub async fn update<'a>(
&'a self,
signature_id: &'a str,
body: &UpdateSignature,
) -> Result<SignatureResponse, Error>
pub async fn update<'a>( &'a self, signature_id: &'a str, body: &UpdateSignature, ) -> Result<SignatureResponse, Error>
Update signature
Update signature
Parameters:
signature_id: &'astr
: The signature ID (required)
async fn example_signatures_update() -> anyhow::Result<()> {
let client = front_api::Client::new_from_env();
let result: front_api::types::SignatureResponse = client
.signatures()
.update(
"some-string",
&front_api::types::UpdateSignature {
name: Some("some-string".to_string()),
sender_info: Some("some-string".to_string()),
body: Some("some-string".to_string()),
is_visible_for_all_teammate_channels: Some(false),
is_default: Some(true),
channel_ids: Some(vec!["some-string".to_string()]),
},
)
.await?;
println!("{:?}", result);
Ok(())
}
Trait Implementations§
Source§impl Clone for Signatures
impl Clone for Signatures
Source§fn clone(&self) -> Signatures
fn clone(&self) -> Signatures
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for Signatures
impl !RefUnwindSafe for Signatures
impl Send for Signatures
impl Sync for Signatures
impl Unpin for Signatures
impl !UnwindSafe for Signatures
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more