pub struct RedashClient { /* private fields */ }Implementations§
Source§impl RedashClient
impl RedashClient
pub fn new(base_url: String, api_key: &str) -> Result<Self>
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 get_query_result( &self, query_id: u64, 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 archive_query(&self, query_id: u64) -> Result<Query>
pub async fn unarchive_query(&self, query_id: u64) -> Result<Query>
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, slug: &str) -> 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 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>>
Auto Trait Implementations§
impl Freeze for RedashClient
impl !RefUnwindSafe for RedashClient
impl Send for RedashClient
impl Sync for RedashClient
impl Unpin for RedashClient
impl UnsafeUnpin for RedashClient
impl !UnwindSafe 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