asterisk_ari_client_rs/apis/
applications.rs

1use crate::errors::Result;
2use crate::models::applications::Application;
3use async_trait::async_trait;
4
5#[async_trait]
6pub trait ApplicationsAPI {
7    /// Filter application events types.
8    async fn filter(
9        &self,
10        application_name: &str,
11        filter: Option<serde_json::Value>,
12    ) -> Result<String>;
13
14    /// Get details of an application.
15    async fn get(&self, application_name: &str) -> Result<Application>;
16
17    /// List all applications.
18    async fn list(&self) -> Result<Vec<Application>>;
19
20    /// Subscribe an application to a event source.
21    async fn subscribe(&self, application_name: &str, event_source: Vec<String>) -> Result<String>;
22
23    /// Unsubscribe an application from an event source.
24    async fn unsubscribe(
25        &self,
26        application_name: &str,
27        event_source: Vec<String>,
28    ) -> Result<String>;
29}