Crate quandl_v3 [] [src]

Rust bindings for Quandl v3 API.

The goal of this crate is to offer a well documented, complete and easy to use interface to Quandl's RESTful API.

This crate uses the rustc_serialize crate extensively and thus suffers from some of its limitation. Namely,

Some other design choices of this crate includes

Simple example

extern crate quandl_v3;

use quandl_v3::Result;
use quandl_v3::prelude::*;

fn main() {
    let query = {
        let mut query = DataQuery::new("WIKI", "AAPL");

         query.order(Order::asc)
              .end_date(2016, 2, 29)
              .start_date(2016, 2, 1)
              .column_index(4);

         query
    };

    let response: Vec<(String, f64)> = query.send().unwrap();

    // Print the date and closing price for Apple's stock for the month of February 2016.
    for data in &response {
        println!("{} - {}", data.0, data.1);
    }
}

This crate is written in the hope it will be useful. I am in no way affiliated to Quandl and Quandl is not endorsing this crate in any way.

Some of the documentation in this crate has been directly copied from Quandl's API Documentation (which is made evident from the links to that documentation directly in this crate's documentation). Those obiously remains the intellectual property of Quandl and were paraphrased to make the use of this crate simpler.

Quandl's Terms of Use

Modules

prelude

This crate's public interface.

Structs

ApiErrorResponse

Struct for storing a Quandl API error response as-is.

QuandlError

Struct holding Quandl's error code and corresponding message.

Enums

Error

Crate-wide error value. This enumerate the only four possible source of failures in this crate.

Type Definitions

Result

Crate-wide return type for functions which may fail.