Crates.io | ulule |
lib.rs | ulule |
version | 1.0.0 |
source | src |
created_at | 2019-07-19 08:25:00.202071 |
updated_at | 2019-10-09 14:30:10.912963 |
description | API bindings for the Ulule v1 HTTP API |
homepage | |
repository | https://github.com/ulule/ulule-rs.git |
max_upload_size | |
id | 150062 |
size | 18,133 |
Rust API bindings for the Ulule v1 HTTP API. This library rely on rust Futures to allow asynchronous 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;
cargo test
Run file from examples with:
cargo run --example <example> -- <example flags> <example args>
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();