whois

Crates.iowhois
lib.rswhois
version0.1.0
sourcesrc
created_at2016-01-31 22:15:07.338525
updated_at2016-01-31 22:15:07.338525
descriptiona whois client library inspired by https://github.com/hjr265/node-whois
homepagehttps://github.com/Vikaton/whois-rs.git
repositoryhttps://github.com/Vikaton/whois-rs.git
max_upload_size
id4039
size6,376
Sinatra (Vikaton)

documentation

README

whois-rs Build status

a whois client library, inspired by https://github.com/hjr265/node-whois

#Example

extern crate whois;
extern crate rustc_serialize;

use whois::WhoIs;
use rustc_serialize::json::Json;

fn main() {
    let data = WhoIs::new("google.com".to_owned()).lookup();
    let foo = &Json::from_str(&data.unwrap()).unwrap();
    let object = foo.as_object().unwrap();
    for (key, value) in object {
        println!("{}: {}", key, match *value {
            Json::String(ref v) => format!("{}", v),
            _ => break
        });
    }
}

#TODO

  • Error-Handling and WHOIS server following
Commit count: 32

cargo fmt