1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
//! Activity interface

use hyper::client::connect::Connect;

use notifications::Notifications;
use stars::Stars;
use Github;

pub struct Activity<C>
where
    C: Clone + Connect + 'static,
{
    github: Github<C>,
}

impl<C: Clone + Connect + 'static> Activity<C> {
    #[doc(hidden)]
    pub fn new(github: Github<C>) -> Self {
        Self { github }
    }

    /// Return a reference to notifications operations
    pub fn notifications(&self) -> Notifications<C> {
        Notifications::new(self.github.clone())
    }

    /// return a reference to starring operations
    pub fn stars(&self) -> Stars<C> {
        Stars::new(self.github.clone())
    }
}