cleverbot_io 1.0.0

A Rust interface for the cleverbot.io API
docs.rs failed to build cleverbot_io-1.0.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: cleverbot_io-1.0.1

cleverbot.io

build status Slack Status Build Status

A Rust interface for Cleverbot.io.

Installation

This crate works with Cargo and can be found on crates.io with a Cargo.toml like:

[dependencies]
cleverbot_io = "*"

Usage

extern crate cleverbot_io;

use cleverbot_io::{Cleverbot};

fn main() {
    // Use an automatically generated reference nick by using None for the third parameter.
    let mut bot = Cleverbot::new(String::from("YOUR_API_KEY"), String::from("YOUR_API_USER"), None);
    // Print the bot's response to a greeting.
    println!("{}", bot.say(&"Hello."));

    // Or, set a nick using Some for the third parameter.
    let mut bot1 = Cleverbot::new(String::from("YOUR_API_KEY"), String::from("YOUR_API_USER"), Some(String::from("Carlos")));
    println!("{}", bot1.say(&"Why am I still talking to you?"));
}