use crate::Octocrab;
pub mod events;
pub mod notifications;
pub mod starring;
pub mod watching;
pub struct ActivityHandler<'octo> {
crab: &'octo Octocrab,
}
impl<'octo> ActivityHandler<'octo> {
pub(crate) fn new(crab: &'octo Octocrab) -> Self {
Self { crab }
}
pub fn notifications(&self) -> notifications::NotificationsHandler<'octo> {
notifications::NotificationsHandler::new(self.crab)
}
pub fn starring(&self) -> starring::StarringHandler<'octo> {
starring::StarringHandler::new(self.crab)
}
pub fn watching(&self) -> watching::WatchingHandler<'octo> {
watching::WatchingHandler::new(self.crab)
}
pub fn events(&self) -> events::ActivityEventsHandler<'octo> {
events::ActivityEventsHandler::new(self.crab)
}
pub async fn feeds(&self) -> crate::Result<crate::models::activity::Feeds> {
self.crab.get("/feeds", None::<&()>).await
}
}