pub struct RedashClient { /* private fields */ }Implementations§
Source§impl RedashClient
impl RedashClient
pub fn new(base_url: String, api_key: &str) -> Result<Self>
pub fn base_url(&self) -> &str
pub async fn list_my_queries( &self, page: u32, page_size: u32, ) -> Result<QueriesResponse>
pub async fn get_query(&self, query_id: u64) -> Result<Query>
pub async fn list_data_sources(&self) -> Result<Vec<DataSource>>
pub async fn get_data_source(&self, data_source_id: u64) -> Result<DataSource>
pub async fn get_data_source_schema( &self, data_source_id: u64, refresh: bool, ) -> Result<DataSourceSchema>
pub async fn create_query(&self, create_query: &CreateQuery) -> Result<Query>
pub async fn create_or_update_query(&self, query: &Query) -> Result<Query>
pub async fn create_visualization( &self, query_id: u64, viz: &CreateVisualization, ) -> Result<Visualization>
pub async fn update_visualization( &self, viz: &Visualization, ) -> Result<Visualization>
pub async fn fetch_all_queries(&self) -> Result<Vec<Query>>
pub async fn refresh_query( &self, query_id: u64, parameters: Option<HashMap<String, Value>>, ) -> Result<Job>
pub async fn poll_job(&self, job_id: &str) -> Result<Job>
pub async fn cancel_job(&self, job_id: &str) -> Result<()>
pub async fn get_query_result( &self, query_id: u64, result_id: u64, ) -> Result<QueryResult>
pub async fn refresh_adhoc_query( &self, sql: &str, data_source_id: u64, parameters: Option<HashMap<String, Value>>, ) -> Result<Job>
pub async fn get_adhoc_query_result( &self, result_id: u64, ) -> Result<QueryResult>
pub async fn execute_query_with_polling( &self, query_id: u64, parameters: Option<HashMap<String, Value>>, timeout_secs: u64, poll_interval_ms: u64, ) -> Result<QueryResult>
pub async fn execute_adhoc_with_polling( &self, sql: &str, data_source_id: u64, parameters: Option<HashMap<String, Value>>, timeout_secs: u64, poll_interval_ms: u64, ) -> Result<QueryResult>
pub async fn archive_query(&self, query_id: u64) -> Result<Query>
pub async fn unarchive_query(&self, query_id: u64) -> Result<Query>
pub async fn list_query_snippets(&self) -> Result<Vec<QuerySnippet>>
pub async fn get_query_snippet(&self, snippet_id: u64) -> Result<QuerySnippet>
pub async fn create_query_snippet( &self, create: &CreateQuerySnippet, ) -> Result<QuerySnippet>
pub async fn update_query_snippet( &self, snippet: &QuerySnippet, ) -> Result<QuerySnippet>
pub async fn delete_query_snippet(&self, snippet_id: u64) -> Result<()>
pub async fn create_dashboard( &self, dashboard: &CreateDashboard, ) -> Result<Dashboard>
pub async fn list_favorite_dashboards( &self, page: u32, page_size: u32, ) -> Result<DashboardsResponse>
pub async fn get_dashboard(&self, slug_or_id: &str) -> Result<Dashboard>
pub async fn update_dashboard(&self, dashboard: &Dashboard) -> Result<Dashboard>
pub async fn archive_dashboard(&self, dashboard_id: u64) -> Result<()>
pub async fn unarchive_dashboard(&self, dashboard_id: u64) -> Result<Dashboard>
pub async fn create_widget(&self, widget: &CreateWidget) -> Result<Widget>
pub async fn update_widget( &self, widget_id: u64, widget: &CreateWidget, ) -> Result<Widget>
pub async fn delete_widget(&self, widget_id: u64) -> Result<()>
pub async fn favorite_dashboard(&self, slug: &str) -> Result<()>
pub async fn fetch_favorite_dashboards(&self) -> Result<Vec<DashboardSummary>>
pub async fn search_queries(&self, q: &str, limit: usize) -> Result<Vec<Query>>
pub async fn search_dashboards( &self, q: &str, limit: usize, ) -> Result<Vec<DashboardSummary>>
Trait Implementations§
Source§impl Clone for RedashClient
impl Clone for RedashClient
Source§fn clone(&self) -> RedashClient
fn clone(&self) -> RedashClient
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 !RefUnwindSafe for RedashClient
impl !UnwindSafe for RedashClient
impl Freeze for RedashClient
impl Send for RedashClient
impl Sync for RedashClient
impl Unpin for RedashClient
impl UnsafeUnpin for RedashClient
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