[][src]Module fred_rs::source

Get a source of economic data

https://research.stlouisfed.org/docs/api/fred/source.html

use fred_rs::client::FredClient;
use fred_rs::source::Response;
 
let mut c = match FredClient::new() {
    Ok(c) => c,
    Err(msg) => {
        println!("{}", msg);
        assert_eq!(2, 1);
        return
    },
};
 
let resp: Response = match c.source(1, None) {
    Ok(resp) => resp,
    Err(msg) => {
        println!("{}", msg);
        assert_eq!(2, 1);
        return
    },
};
 
for item in resp.sources {
    match item.link {
        Some(l) => println!("{}: {}", item.name, l),
        None => println!("{}: null", item.name),
    }
}

Modules

releases

Get the releases for a source

Structs

Builder
Response

Response data structure for the fred/source endpoint

Source

Data structure containing infomation about a particular tag