pub struct Tags<'a> { /* private fields */ }Expand description
Tag management namespace. Reached via Rerout::tags.
Implementations§
Source§impl<'a> Tags<'a>
impl<'a> Tags<'a>
Sourcepub async fn list(&self) -> Result<ListTagsResult>
pub async fn list(&self) -> Result<ListTagsResult>
List the project’s tags with their live link counts.
GET /v1/projects/me/tags. Each entry in the returned
ListTagsResult::tags is a crate::TagSummary — the tag plus a
link_count of the live (non-deleted) links it is attached to.
Sourcepub async fn create(&self, input: &CreateTagInput) -> Result<Tag>
pub async fn create(&self, input: &CreateTagInput) -> Result<Tag>
Create a tag.
POST /v1/projects/me/tags with CreateTagInput as the JSON body.
color is optional — the server validates it against its palette and
defaults to teal. The returned Tag has no link_count.
Sourcepub async fn update(&self, tag_id: &str, input: &UpdateTagInput) -> Result<Tag>
pub async fn update(&self, tag_id: &str, input: &UpdateTagInput) -> Result<Tag>
Update a tag’s name and/or color.
PATCH /v1/projects/me/tags/:tag_id. Only the fields set on
UpdateTagInput are sent; omitted fields are left unchanged. There is
no client-side empty-payload check — the server returns 400 for a
fully empty patch.
Sourcepub async fn delete(&self, tag_id: &str) -> Result<DeleteTagResult>
pub async fn delete(&self, tag_id: &str) -> Result<DeleteTagResult>
Delete a tag and drop its assignments from all links.
DELETE /v1/projects/me/tags/:tag_id.