#api-bindings #http-api #future

ulule

API bindings for the Ulule v1 HTTP API

5 releases (1 stable)

1.0.0 Oct 9, 2019
0.0.3 Sep 13, 2019
0.0.2 Sep 6, 2019
0.0.1 Jul 19, 2019
0.0.0 Jul 19, 2019

#115 in #http-api


Used in ulule-client

MIT license

17KB
325 lines

Ulule

ulule on crates.io stripe-rust on docs.rs

Rust API bindings for the Ulule v1 HTTP API. This library rely on rust Futures to allow asynchronous usage.

Ulule API documentation

Usage

Put this in Cargo.toml:

[dependencies]
ulule = "1.0.0"
ulule_client = "0.0.3"

and this in the crate root:

extern crate ulule;
extern crate ulule_client;

Test

cargo test

Examples

Run file from examples with:

cargo run --example <example> -- <example flags> <example args>

Getting Started

To get started, create a client:

let client = ulule_client::Client::new();

Search for the last three project created matching the term beer with their owner:

let p = search::Params::new()
        .limit(3)
        .with_term("beer")
        .with_extra_fields(vec!["owner".to_string()]);

// inside an actor system like actix_rt
let projects: search::Projects = actix_rt::System::new("test").block_on(lazy(|| {
    ulule_client::search_projects(&client, Some(p))
})).unwrap();

Dependencies

~0.7–1.5MB
~33K SLoC