pub struct TagsApi<'a> { /* private fields */ }Expand description
Tag endpoints.
Implementations§
Source§impl<'a> TagsApi<'a>
impl<'a> TagsApi<'a>
Sourcepub async fn for_ticket(&self, ticket_id: u64) -> Result<Vec<String>>
pub async fn for_ticket(&self, ticket_id: u64) -> Result<Vec<String>>
GET /api/v1/tags?object=Ticket&o_id=:ticket_id - tags on one ticket.
Sourcepub async fn add(&self, ticket_id: u64, tag: &str) -> Result<()>
pub async fn add(&self, ticket_id: u64, tag: &str) -> Result<()>
POST /api/v1/tags/add - attach a tag to a ticket.
Sourcepub async fn remove(&self, ticket_id: u64, tag: &str) -> Result<()>
pub async fn remove(&self, ticket_id: u64, tag: &str) -> Result<()>
POST /api/v1/tags/remove - detach a tag from a ticket.
Sourcepub async fn list_all(&self) -> Result<Vec<TagListEntry>>
pub async fn list_all(&self) -> Result<Vec<TagListEntry>>
GET /api/v1/tag_list - every tag known to the instance.
Sourcepub async fn rename(&self, tag_id: u64, new_name: &str) -> Result<()>
pub async fn rename(&self, tag_id: u64, new_name: &str) -> Result<()>
PUT /api/v1/tag_list/:id - rename a tag instance-wide.
Renaming a global tag rewrites it on every object currently carrying it, so this is the correct way to migrate a tag’s name - as opposed to removing the old tag and adding a new one per object.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for TagsApi<'a>
impl<'a> !UnwindSafe for TagsApi<'a>
impl<'a> Freeze for TagsApi<'a>
impl<'a> Send for TagsApi<'a>
impl<'a> Sync for TagsApi<'a>
impl<'a> Unpin for TagsApi<'a>
impl<'a> UnsafeUnpin for TagsApi<'a>
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