aboutsummaryrefslogtreecommitdiff
path: root/src/commands/mod.rs
blob: 49b2cbad99ac6a77625ba721731e6144b7a2c804 (plain)
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
use tw;
use ::Queryer;

pub struct Command {
    pub keyword: &'static str,
    pub params: u8,
    pub exec: fn(line: String, tweeter: &mut tw::TwitterCache, queryer: &mut Queryer)
}

mod show_cache;
mod twete;
mod look_up;
mod view;
mod quit;
mod fav;
mod follow;
mod thread;

pub static COMMANDS: &[&Command] = &[
    &show_cache::SHOW_CACHE,
    &quit::QUIT,
    &look_up::LOOK_UP_USER,
    &look_up::LOOK_UP_TWEET,
    &view::VIEW,
    &view::VIEW_THREAD,
    &follow::FOLLOW,
    &follow::UNFOLLOW,
    &fav::UNFAV,
    &fav::FAV,
    &twete::DEL,
    &twete::TWETE,
    &twete::QUOTE,
    &twete::RETWETE,
    &twete::REP,
    &twete::THREAD,
    &thread::FORGET_THREAD,
    &thread::REMEMBER_THREAD,
    &thread::LIST_THREADS
    /*
        &QUIT,
        &LOOK_UP_USER,
        &LOOK_UP_TWEET,
        &VIEW,
        &UNFAV,
        &FAV,
        &DEL,
        &TWETE,
        &QUOTE,
        &RETWETE,
        &REP,
        &THREAD
    ];
    */
];