aboutsummaryrefslogtreecommitdiff
path: root/src/commands/mod.rs
blob: 8108a784158abd63e2206cb2c8a07bba56ba2ce7 (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
use display::DisplayInfo;
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, display_info: &mut DisplayInfo),
    pub param_str: &'static str,
    pub help_str: &'static str
}

pub mod dm;
pub mod help;
pub mod auth;
pub mod show_cache;
pub mod twete;
pub mod look_up;
pub mod view;
pub mod quit;
pub mod fav;
pub mod follow;
pub mod thread;
pub mod profile;

pub static COMMANDS: &[&Command] = &[
    &dm::DM,
    &profile::PROFILE,
    &profile::PROFILES,
    &help::HELP,
    &auth::AUTH,
    &auth::PIN,
    &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
];