mod events;
mod rule;
mod rules;
use crate::Client;
use events::Events;
use rule::Rule;
use rules::Rules;
pub struct Analytics<'a> {
pub(super) client: &'a Client,
}
impl<'a> Analytics<'a> {
#[inline]
pub(super) fn new(client: &'a Client) -> Self {
Self { client }
}
#[inline]
pub fn rules(&self) -> Rules<'a> {
Rules::new(self.client)
}
#[inline]
pub fn rule(&self, rule_name: &'a str) -> Rule<'a> {
Rule::new(self.client, rule_name)
}
#[inline]
pub fn events(&self) -> Events<'a> {
Events::new(self.client)
}
}