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
//! Rust Client/Wrapper built for [Alphavantage][alpha_vantage_link] API.
//!
//! [alpha_vantage_link]: https://alphavantage.co

pub mod crypto;

pub mod exchange;

pub mod forex;

pub mod quote;

pub mod search;

pub mod sector;

pub mod stock_time;

pub mod technical_indicator;

/// Module for basic definition of user information like setting API and
/// requesting through that API
pub mod user;

/// Utility module declaring enum for basic function and parameters for
/// different API
pub mod util;

use self::user::APIKey;

/// Set API value which can be used for calling different module
pub fn set_api(api: &str) -> APIKey {
    APIKey::set_api(api)
}

/// Set API value with timeout period
pub fn set_with_timeout(api: &str, timeout: u64) -> APIKey {
    APIKey::set_with_timeout(api, timeout)
}