pub struct Client { /* private fields */ }
Expand description
Entrypoint for interacting with the Pagerduty API.
Implementations§
Source§impl Client
impl Client
Sourcepub fn new_from_env() -> Self
pub fn new_from_env() -> Self
Create a new Client struct from environment variables. As long as the function is given a valid API key and your requests will work.
Sourcepub async fn create_service(&self, service: &Service) -> Result<Service>
pub async fn create_service(&self, service: &Service) -> Result<Service>
Create a service.
Sourcepub async fn list_services(&self) -> Result<Vec<Service>>
pub async fn list_services(&self) -> Result<Vec<Service>>
List all services.
Sourcepub async fn list_escalation_policies(&self) -> Result<Vec<EscalationPolicy>>
pub async fn list_escalation_policies(&self) -> Result<Vec<EscalationPolicy>>
List all escalation policies.
Sourcepub async fn get_service(&self, id: &str) -> Result<Service>
pub async fn get_service(&self, id: &str) -> Result<Service>
Get a service.
Sourcepub async fn update_service(&self, service: &Service) -> Result<Service>
pub async fn update_service(&self, service: &Service) -> Result<Service>
Update a service.
Sourcepub async fn delete_service(&self, id: &str) -> Result<()>
pub async fn delete_service(&self, id: &str) -> Result<()>
Delete a service.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
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