Project

cbot

0.0
No commit activity in last 3 years
No release in over 3 years
A fully featured wrapper to the Cleverbot.com web API.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 1.8.6, ~> 1.8
 Project Readme

Build Status

cleverbot

A Ruby wrapper for the cleverbot.com API. Adapted from cleverbot.io API for cleverbot.com

Installation

gem install cbot

Bundler

Add this line to your Gemfile:

gem 'cbot', git: 'git@github.com:elieltavares/cleverbot.git',
                    branch: 'master'

Or

gem 'cbot'

And then execute:

$ bundle install

LoadError: cannot load such file

require 'bundler/setup'

Usage

Be sure to look at the actual documentation for the cleverbot.com API when you are not sure about something. Or ask for documentation clarification in the issue tracker here.

Before using this module, please get your API keys at http://www.cleverbot.com/api/.

require 'cleverbot'

# Create a new Cleverbot instance, with an optional reference nick set.
CLEVER = Cleverbot::Client.new('api_key')

# Talk with your pal, Cleverbot.
CLEVER.say('Why am I still talking to you?')
# => 'Because you have a beautiful soul.'

Identifier

Start a new conversation with Mike the symbol

puts CLEVER.say('hello', :mike) #=> 'hello'
puts CLEVER.say('my name is mike', :mike) #=> 'ok'

Start a new conversation with Zac the string.

puts CLEVER.say('hello', 'Zac') #=> 'hello'
puts CLEVER.say('my name is mike', 'Zac') #=> 'no it is zac'

Delete

puts CLEVER.delete(:mike)
puts CLEVER.delete('Zac')