cleverbot_io

Crates.iocleverbot_io
lib.rscleverbot_io
version1.0.1
sourcesrc
created_at2016-03-12 22:08:15.077673
updated_at2017-01-30 21:05:32.624943
descriptionA Rust interface for the cleverbot.io API
homepagehttps://cleverbot.io/
repositoryhttps://github.com/CleverbotIO/rust-cleverbot.io
max_upload_size
id4436
size8,148
Eli Clemente Gordillo Foster (elifoster)

documentation

https://docs.cleverbot.io/docs/getting-started-with-rust

README

cleverbot.io

Slack Status Build Status Total Downloads Latest Version Crates.io

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() {
    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());
}
Commit count: 16

cargo fmt