pub struct Monitors<'a> { /* private fields */ }Expand description
/v1/monitors (+ /v1/changes/recent).
Implementations§
Source§impl Monitors<'_>
impl Monitors<'_>
Sourcepub async fn list(&self) -> Result<Page<Monitor>>
pub async fn list(&self) -> Result<Page<Monitor>>
GET /v1/monitors (bare-array endpoint, normalized to Page).
Sourcepub async fn list_with(&self, query: &[(&str, &str)]) -> Result<Page<Monitor>>
pub async fn list_with(&self, query: &[(&str, &str)]) -> Result<Page<Monitor>>
GET /v1/monitors with query params (limit, check_type).
Sourcepub async fn create(&self, body: Value) -> Result<Monitor>
pub async fn create(&self, body: Value) -> Result<Monitor>
POST /v1/monitors — requires a non-empty url. A 409 device_capacity
surfaces as a normal WritError::Api.
Sourcepub async fn run(&self, id: i64) -> Result<Value>
pub async fn run(&self, id: i64) -> Result<Value>
POST /v1/monitors/:id/run — run the check now; returns the check outcome.
Sourcepub async fn changes(&self, id: i64) -> Result<MonitorHistory>
pub async fn changes(&self, id: i64) -> Result<MonitorHistory>
GET /v1/monitors/:id/changes — change + uptime history.
Sourcepub async fn changes_with(
&self,
id: i64,
query: &[(&str, &str)],
) -> Result<MonitorHistory>
pub async fn changes_with( &self, id: i64, query: &[(&str, &str)], ) -> Result<MonitorHistory>
GET /v1/monitors/:id/changes with limit/offset.
Sourcepub async fn capacity(&self) -> Result<Value>
pub async fn capacity(&self) -> Result<Value>
GET /v1/monitors/capacity — the device check-capacity meter.
Sourcepub async fn recent_changes(&self) -> Result<Page<Value>>
pub async fn recent_changes(&self) -> Result<Page<Value>>
GET /v1/changes/recent — cross-monitor recent content changes.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Monitors<'a>
impl<'a> !UnwindSafe for Monitors<'a>
impl<'a> Freeze for Monitors<'a>
impl<'a> Send for Monitors<'a>
impl<'a> Sync for Monitors<'a>
impl<'a> Unpin for Monitors<'a>
impl<'a> UnsafeUnpin for Monitors<'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