[][src]Module fred_rs::category

Get a category

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

use fred_rs::client::FredClient;
use fred_rs::category::Response;
 
let mut c = match FredClient::new() {
Ok(c) => c,
    Err(msg) => {
        println!("{}", msg);
        assert_eq!(2, 1);
        return
    },
};
 
let resp: Response = match c.category(125) {
    Ok(resp) => resp,
    Err(msg) => {
        println!("{}", msg);
        assert_eq!(2, 1);
        return
    },
};
 
for s in resp.categories {
    println!("ID: {}  Name: {}  ParentID: {}", s.id, s.name, s.parent_id);
}

Modules

children

Get the child categories for a specified parent category

related

Get the related categories for a category

related_tags

Get the related tags for a category

series

Get the series in a category

tags

Get the tags for a category

Structs

Category

Data structure containing infomation about a particular category

Response

Response data structure for a collection of categories