ruroonga_client 0.3.0

A tiny Groonga HTTP client.
docs.rs failed to build ruroonga_client-0.3.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: ruroonga_client-0.5.1

Ruroonga Client

Build Status

A tiny Groonga client via HTTP written by Rust language.

Usage

Add following lines to your Cargo.toml:

[dependencies]
ruroonga_client = "*"

and following lines to your crate root:

extern crate ruroonga_client;

use ruroonga_client as groonga;

Example

extern crate ruroonga_client;

use ruroonga_client as groonga;

fn main() {
    let mut request = groonga::HTTPRequest::new();
    let mut command = groonga::CommandQuery::new("select");
    command.set_argument(vec![("table", "Sites")]);
    let uri_base = groonga::URIBase::new().build();
    let url = groonga::RequestURI::new(uri_base, command.encode()).url();
    println!("url: {}", url);
    let res = request.get(url);
    let result = request.receive(&mut res.unwrap()).unwrap();
    println!("result: {}", result);
}

Testing

Execute cargo test.

Advanced

If you encountered building failure which is dependent openssl library, you should define several environment variables.

For OS X

You can use homebrewed openssl like this:

$ export OPENSSL_INCLUDE_DIR=/usr/local/opt/openssl/include
$ export DEP_OPENSSL_INCLUDE=/usr/local/opt/openssl/include

And then, cargo build.

For Windows

In more detail, see: https://github.com/sfackler/rust-openssl#windows

LICENSE

MIT.