pub struct JiraClient { /* private fields */ }Implementations§
Source§impl JiraClient
impl JiraClient
pub fn new(config: JiraConfig) -> Self
pub fn base_url(&self) -> &str
Sourcepub async fn get_myself(&self) -> Result<String>
pub async fn get_myself(&self) -> Result<String>
Get the current authenticated user’s accountId.
Sourcepub async fn search_issues(
&self,
jql: &str,
next_page_token: Option<&str>,
max_results: Option<u32>,
) -> Result<SearchResult>
pub async fn search_issues( &self, jql: &str, next_page_token: Option<&str>, max_results: Option<u32>, ) -> Result<SearchResult>
Search issues using JQL with cursor-based pagination.
Sourcepub async fn create_issue(&self, req: CreateIssueRequest) -> Result<Issue>
pub async fn create_issue(&self, req: CreateIssueRequest) -> Result<Issue>
Create a new issue.
Sourcepub async fn update_issue(
&self,
key: &str,
req: UpdateIssueRequest,
) -> Result<()>
pub async fn update_issue( &self, key: &str, req: UpdateIssueRequest, ) -> Result<()>
Update an existing issue.
Sourcepub async fn delete_issue(&self, key: &str) -> Result<()>
pub async fn delete_issue(&self, key: &str) -> Result<()>
Delete an issue.
Sourcepub async fn get_project_fields(&self, project_key: &str) -> Result<Vec<Field>>
pub async fn get_project_fields(&self, project_key: &str) -> Result<Vec<Field>>
Get fields available for a project (runtime field resolution — no hardcoding).
Sourcepub async fn get_server_info(&self) -> Result<Value>
pub async fn get_server_info(&self) -> Result<Value>
Get server info (used to detect Jira tier).
Sourcepub async fn transition_issue(
&self,
key: &str,
transition_id: &str,
) -> Result<()>
pub async fn transition_issue( &self, key: &str, transition_id: &str, ) -> Result<()>
Transition an issue to a new status.
Sourcepub async fn get_transitions(&self, key: &str) -> Result<Vec<Value>>
pub async fn get_transitions(&self, key: &str) -> Result<Vec<Value>>
Get available transitions for an issue.
Sourcepub async fn get_issue_types(&self, project_key: &str) -> Result<Vec<IssueType>>
pub async fn get_issue_types(&self, project_key: &str) -> Result<Vec<IssueType>>
Get available issue types for a project (id + name).
Sourcepub async fn get_fields_for_issue_type(
&self,
project_key: &str,
issue_type_id: &str,
) -> Result<Vec<Field>>
pub async fn get_fields_for_issue_type( &self, project_key: &str, issue_type_id: &str, ) -> Result<Vec<Field>>
Get fields for a specific issue type within a project (with allowed values).
Sourcepub async fn search_users(&self, query: &str) -> Result<Vec<Value>>
pub async fn search_users(&self, query: &str) -> Result<Vec<Value>>
Search Jira users by query string (for User field autocomplete).
Sourcepub async fn upload_attachment(
&self,
issue_key: &str,
file_path: &Path,
) -> Result<Vec<Attachment>>
pub async fn upload_attachment( &self, issue_key: &str, file_path: &Path, ) -> Result<Vec<Attachment>>
Upload a file as an attachment to an issue.
Sourcepub async fn create_issue_v2(&self, req: CreateIssueRequestV2) -> Result<Issue>
pub async fn create_issue_v2(&self, req: CreateIssueRequestV2) -> Result<Issue>
Create a new issue with dynamic custom fields.
Sourcepub async fn get_worklogs(&self, issue_key: &str) -> Result<Vec<Worklog>>
pub async fn get_worklogs(&self, issue_key: &str) -> Result<Vec<Worklog>>
List all worklogs for an issue.
Sourcepub async fn add_worklog(
&self,
issue_key: &str,
time_spent: &str,
comment: Option<&str>,
started: Option<&str>,
) -> Result<Worklog>
pub async fn add_worklog( &self, issue_key: &str, time_spent: &str, comment: Option<&str>, started: Option<&str>, ) -> Result<Worklog>
Add a worklog entry to an issue.
time_spent uses Jira format: “2h 30m”, “1d”, “45m”
started is optional ISO 8601 timestamp; defaults to now if None.
Sourcepub async fn delete_worklog(
&self,
issue_key: &str,
worklog_id: &str,
) -> Result<()>
pub async fn delete_worklog( &self, issue_key: &str, worklog_id: &str, ) -> Result<()>
Delete a worklog entry.
Sourcepub async fn get_all_issues(&self, jql: &str) -> Result<Vec<Issue>>
pub async fn get_all_issues(&self, jql: &str) -> Result<Vec<Issue>>
Fetch ALL issues matching a JQL query using cursor-based pagination. Respects the Atlassian safeguard: max 500 pages.
Sourcepub async fn archive_issues(&self, issue_keys: &[String]) -> Result<()>
pub async fn archive_issues(&self, issue_keys: &[String]) -> Result<()>
Archive a batch of issues by key. Jira accepts up to 1000 per request.
Sourcepub async fn raw_request(
&self,
method: &str,
path: &str,
body: Option<Value>,
) -> Result<Option<Value>>
pub async fn raw_request( &self, method: &str, path: &str, body: Option<Value>, ) -> Result<Option<Value>>
Execute an arbitrary Jira REST API call and return the raw JSON response.
Returns None for 204 No Content responses (success with no body).
path should start with /rest/...
Check if this Jira instance is Premium tier.
Auto Trait Implementations§
impl Freeze for JiraClient
impl !RefUnwindSafe for JiraClient
impl Send for JiraClient
impl Sync for JiraClient
impl Unpin for JiraClient
impl UnsafeUnpin for JiraClient
impl !UnwindSafe for JiraClient
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
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> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi Quirk value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);