Crates.io | cleverbot_io |
lib.rs | cleverbot_io |
version | 1.0.1 |
source | src |
created_at | 2016-03-12 22:08:15.077673 |
updated_at | 2017-01-30 21:05:32.624943 |
description | A Rust interface for the cleverbot.io API |
homepage | https://cleverbot.io/ |
repository | https://github.com/CleverbotIO/rust-cleverbot.io |
max_upload_size | |
id | 4436 |
size | 8,148 |
A Rust interface for Cleverbot.io.
This crate works with Cargo and can be found on crates.io with a Cargo.toml
like:
[dependencies]
cleverbot_io = "*"
extern crate cleverbot_io;
use cleverbot_io::{Cleverbot};
fn main() {
let api_user = "YOUR_API_USER";
let api_key = "YOUR_API_KEY";
let mut bot = Cleverbot::new(api_user.into(), api_key.into(), None).unwrap();
println!("{}", bot.say("Hello.").unwrap());
let mut carlos = Cleverbot::new(api_user.into(), api_key.into(), Some(String::from("Carlos1"))).unwrap();
println!("{}", carlos.say("Why am I still talking to you?").unwrap());
}