{"_id":"54fe419b4759dc2100593701","editedParams":true,"editedParams2":true,"githubsync":"","hidden":false,"user":"54294dd7ee5e3c08001572da","version":"54fe419a4759dc21005936fe","link_url":"","slug":"getting-started","next":{"description":"","pages":[]},"sync_unique":"","__v":14,"body":"[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"parameter name\",\n    \"h-1\": \"description\",\n    \"0-1\": \"The api username given to you at [https://cleverbot.io/keys](https://cleverbot.io/keys)\",\n    \"1-1\": \"The api key given to you at [https://cleverbot.io/keys](https://cleverbot.io/keys)\",\n    \"0-0\": \"**user**\",\n    \"1-0\": \"**key**\",\n    \"2-1\": \"The reference name you give to the instance to access later when making calls\",\n    \"2-0\": \"**nick** *(optional)*\"\n  },\n  \"cols\": 2,\n  \"rows\": 3\n}\n[/block]\nResponse parameters\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"parameter name\",\n    \"h-1\": \"description\",\n    \"0-0\": \"**status**\",\n    \"0-1\": \"If creation is successful, this will be *\\\"success\\\"*, if there is an error, this will be replaced by an error message\",\n    \"1-0\": \"**nick**\",\n    \"1-1\": \"This will return an access name, if you did not specify it in the request, or it is already taken, a random one is generated for you.\"\n  },\n  \"cols\": 2,\n  \"rows\": 2\n}\n[/block]","createdAt":"2015-03-10T00:58:03.407Z","isReference":false,"link_external":false,"type":"post","updates":[],"api":{"url":"/create","auth":"required","examples":{"codes":[]},"method":"post","params":[{"type":"string","_id":"54fe4dda4f692335008c3567","default":"[[app:user]]","desc":"","in":"body","name":"user","ref":"","required":false},{"required":false,"type":"string","_id":"54fe4dda4f692335008c3566","default":"[[app:key]]","desc":"","in":"body","name":"key","ref":""},{"in":"body","name":"nick","ref":"","required":false,"type":"string","_id":"54fe4dda4f692335008c3565","default":"(optional)","desc":""}],"results":{"codes":[{"status":200,"language":"json","code":"{\n  status: \"success\",\n  nick: \"NickTheRobot\"\n}","name":""},{"status":400,"language":"json","code":"{\n  status: \"insert_error_here happened\"\n}","name":""}]},"settings":""},"category":"54fe419a4759dc21005936ff","excerpt":"","order":0,"project":"54fe41994759dc21005936fb","title":"Creating a bot instance","childrenPages":[]}

postCreating a bot instance


Body Params

user:
string{{keys('user')}}
key:
string{{keys('key')}}
nick:
string(optional)
[block:parameters] { "data": { "h-0": "parameter name", "h-1": "description", "0-1": "The api username given to you at [https://cleverbot.io/keys](https://cleverbot.io/keys)", "1-1": "The api key given to you at [https://cleverbot.io/keys](https://cleverbot.io/keys)", "0-0": "**user**", "1-0": "**key**", "2-1": "The reference name you give to the instance to access later when making calls", "2-0": "**nick** *(optional)*" }, "cols": 2, "rows": 3 } [/block] Response parameters [block:parameters] { "data": { "h-0": "parameter name", "h-1": "description", "0-0": "**status**", "0-1": "If creation is successful, this will be *\"success\"*, if there is an error, this will be replaced by an error message", "1-0": "**nick**", "1-1": "This will return an access name, if you did not specify it in the request, or it is already taken, a random one is generated for you." }, "cols": 2, "rows": 2 } [/block]

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



[block:parameters] { "data": { "h-0": "parameter name", "h-1": "description", "0-1": "The api username given to you at [https://cleverbot.io/keys](https://cleverbot.io/keys)", "1-1": "The api key given to you at [https://cleverbot.io/keys](https://cleverbot.io/keys)", "0-0": "**user**", "1-0": "**key**", "2-1": "The reference name you give to the instance to access later when making calls", "2-0": "**nick** *(optional)*" }, "cols": 2, "rows": 3 } [/block] Response parameters [block:parameters] { "data": { "h-0": "parameter name", "h-1": "description", "0-0": "**status**", "0-1": "If creation is successful, this will be *\"success\"*, if there is an error, this will be replaced by an error message", "1-0": "**nick**", "1-1": "This will return an access name, if you did not specify it in the request, or it is already taken, a random one is generated for you." }, "cols": 2, "rows": 2 } [/block]
{"_id":"54fe52dd4f692335008c3570","api":{"auth":"required","method":"post","params":[{"default":"[[app:user]]","type":"string","name":"user","in":"body","_id":"54fe4dda4f692335008c3567","required":false,"desc":""},{"required":false,"desc":"","default":"[[app:key]]","type":"string","name":"key","in":"body","_id":"54fe4dda4f692335008c3566"},{"desc":"","name":"nick","required":false,"type":"string","in":"body","_id":"54fe4dda4f692335008c3565","default":"cleverbot"},{"default":"Just a small town girl","type":"string","name":"text","in":"body","_id":"54fe52dd4f692335008c3571","required":false,"desc":""}],"results":{"codes":[{"status":200,"language":"json","code":"{\n  status: \"success\",\n  response: \"Livin' in a lonely world\"\n}","name":""},{"code":"{\n  status: \"insert_error_here happened\"\n}","name":"","status":400,"language":"json"}]},"url":"/ask"},"body":"[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"parameter name\",\n    \"h-1\": \"description\",\n    \"0-1\": \"The api username given to you at [https://cleverbot.io/keys](https://cleverbot.io/keys)\",\n    \"1-1\": \"The api key given to you at [https://cleverbot.io/keys](https://cleverbot.io/keys)\",\n    \"0-0\": \"**user**\",\n    \"1-0\": \"**key**\",\n    \"2-1\": \"The reference name you gave to the instance to access when making calls\",\n    \"2-0\": \"**nick**\",\n    \"3-0\": \"**text**\",\n    \"3-1\": \"The text to query cleverbot with\"\n  },\n  \"cols\": 2,\n  \"rows\": 4\n}\n[/block]\nResponse parameters\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"parameter name\",\n    \"h-1\": \"description\",\n    \"0-0\": \"**status**\",\n    \"0-1\": \"If creation is successful, this will be *\\\"success\\\"*, if there is an error, this will be replaced by an error message\",\n    \"1-0\": \"**response**\",\n    \"1-1\": \"This will return cleverbot's response to your query.\"\n  },\n  \"cols\": 2,\n  \"rows\": 2\n}\n[/block]","hidden":false,"link_url":"","project":"54fe41994759dc21005936fb","slug":"querying-cleverbot","title":"Querying cleverbot","__v":0,"createdAt":"2015-03-10T02:11:41.307Z","editedParams":true,"order":999,"sync_unique":"","version":"54fe419a4759dc21005936fe","category":"54fe419a4759dc21005936ff","editedParams2":true,"excerpt":"","githubsync":"","link_external":false,"type":"post","updates":[],"user":"54294dd7ee5e3c08001572da","childrenPages":[]}

postQuerying cleverbot


Body Params

user:
string{{keys('user')}}
key:
string{{keys('key')}}
nick:
stringcleverbot
text:
stringJust a small town girl
[block:parameters] { "data": { "h-0": "parameter name", "h-1": "description", "0-1": "The api username given to you at [https://cleverbot.io/keys](https://cleverbot.io/keys)", "1-1": "The api key given to you at [https://cleverbot.io/keys](https://cleverbot.io/keys)", "0-0": "**user**", "1-0": "**key**", "2-1": "The reference name you gave to the instance to access when making calls", "2-0": "**nick**", "3-0": "**text**", "3-1": "The text to query cleverbot with" }, "cols": 2, "rows": 4 } [/block] Response parameters [block:parameters] { "data": { "h-0": "parameter name", "h-1": "description", "0-0": "**status**", "0-1": "If creation is successful, this will be *\"success\"*, if there is an error, this will be replaced by an error message", "1-0": "**response**", "1-1": "This will return cleverbot's response to your query." }, "cols": 2, "rows": 2 } [/block]

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



[block:parameters] { "data": { "h-0": "parameter name", "h-1": "description", "0-1": "The api username given to you at [https://cleverbot.io/keys](https://cleverbot.io/keys)", "1-1": "The api key given to you at [https://cleverbot.io/keys](https://cleverbot.io/keys)", "0-0": "**user**", "1-0": "**key**", "2-1": "The reference name you gave to the instance to access when making calls", "2-0": "**nick**", "3-0": "**text**", "3-1": "The text to query cleverbot with" }, "cols": 2, "rows": 4 } [/block] Response parameters [block:parameters] { "data": { "h-0": "parameter name", "h-1": "description", "0-0": "**status**", "0-1": "If creation is successful, this will be *\"success\"*, if there is an error, this will be replaced by an error message", "1-0": "**response**", "1-1": "This will return cleverbot's response to your query." }, "cols": 2, "rows": 2 } [/block]
{"_id":"552745d87d4a44170095170c","excerpt":"","updates":[],"category":"552745197d4a44170095170b","githubsync":"","order":999,"link_external":false,"link_url":"","version":"54fe419a4759dc21005936fe","sync_unique":"","__v":4,"api":{"url":"","auth":"required","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]}},"body":"# cleverbot.io\n\nTo install this package, simply enter the following in your console\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"npm install --save cleverbot.io\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\n  Note: It is a good practice to include *--save* to add this to your dependencies in your package.json\n  \nBefore using this module, please get your API keys at [http://cleverbot.io/keys](http://cleverbot.io/keys)\n\nTo initialize cleverbot, require the module, then create a new instance of cleverbot\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"var cleverbot = require(\\\"cleverbot.io\\\"),\\nbot = new cleverbot(\\\"YOUR_API_USER\\\", \\\"YOUR_API_KEY\\\");\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]\n\n    \n*cleverbot.io* allows you to save cleverbot sessions to access later\nIf you've already created a session previously, simply add the following code to reference it\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"bot.setNick(\\\"sessionname\\\");\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]\n\n\nTo create or access a cleverbot session, start with the following\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"bot.create(function (err, session) {\\n  // session is your session name, it will either be as you set it previously, or cleverbot.io will generate one for you\\n\\n  // Woo, you initialized cleverbot.io.  Insert further code here\\n});\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]\n\n    \nNow querying cleverbot is simple, you pass the text to the *.ask()* method\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"bot.ask(\\\"Just a small town girl\\\", function (err, response) {\\n\\tconsole.log(response); // Will likely be: \\\"Living in a lonely world\\\"\\n});\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]\n\n    \nWell, that's it for now!  Happy hacking!\n\n**Cleverbot.io is free and open source, and will remain so.**","createdAt":"2015-04-10T03:39:04.579Z","hidden":false,"project":"54fe41994759dc21005936fb","slug":"getting-started-with-nodejs","title":"Getting started with Node.JS","type":"basic","user":"54294dd7ee5e3c08001572da","childrenPages":[]}

Getting started with Node.JS


# cleverbot.io To install this package, simply enter the following in your console [block:code] { "codes": [ { "code": "npm install --save cleverbot.io", "language": "shell" } ] } [/block] Note: It is a good practice to include *--save* to add this to your dependencies in your package.json Before using this module, please get your API keys at [http://cleverbot.io/keys](http://cleverbot.io/keys) To initialize cleverbot, require the module, then create a new instance of cleverbot [block:code] { "codes": [ { "code": "var cleverbot = require(\"cleverbot.io\"),\nbot = new cleverbot(\"YOUR_API_USER\", \"YOUR_API_KEY\");", "language": "javascript" } ] } [/block] *cleverbot.io* allows you to save cleverbot sessions to access later If you've already created a session previously, simply add the following code to reference it [block:code] { "codes": [ { "code": "bot.setNick(\"sessionname\");", "language": "javascript" } ] } [/block] To create or access a cleverbot session, start with the following [block:code] { "codes": [ { "code": "bot.create(function (err, session) {\n // session is your session name, it will either be as you set it previously, or cleverbot.io will generate one for you\n\n // Woo, you initialized cleverbot.io. Insert further code here\n});", "language": "javascript" } ] } [/block] Now querying cleverbot is simple, you pass the text to the *.ask()* method [block:code] { "codes": [ { "code": "bot.ask(\"Just a small town girl\", function (err, response) {\n\tconsole.log(response); // Will likely be: \"Living in a lonely world\"\n});", "language": "javascript" } ] } [/block] Well, that's it for now! Happy hacking! **Cleverbot.io is free and open source, and will remain so.**
# cleverbot.io To install this package, simply enter the following in your console [block:code] { "codes": [ { "code": "npm install --save cleverbot.io", "language": "shell" } ] } [/block] Note: It is a good practice to include *--save* to add this to your dependencies in your package.json Before using this module, please get your API keys at [http://cleverbot.io/keys](http://cleverbot.io/keys) To initialize cleverbot, require the module, then create a new instance of cleverbot [block:code] { "codes": [ { "code": "var cleverbot = require(\"cleverbot.io\"),\nbot = new cleverbot(\"YOUR_API_USER\", \"YOUR_API_KEY\");", "language": "javascript" } ] } [/block] *cleverbot.io* allows you to save cleverbot sessions to access later If you've already created a session previously, simply add the following code to reference it [block:code] { "codes": [ { "code": "bot.setNick(\"sessionname\");", "language": "javascript" } ] } [/block] To create or access a cleverbot session, start with the following [block:code] { "codes": [ { "code": "bot.create(function (err, session) {\n // session is your session name, it will either be as you set it previously, or cleverbot.io will generate one for you\n\n // Woo, you initialized cleverbot.io. Insert further code here\n});", "language": "javascript" } ] } [/block] Now querying cleverbot is simple, you pass the text to the *.ask()* method [block:code] { "codes": [ { "code": "bot.ask(\"Just a small town girl\", function (err, response) {\n\tconsole.log(response); // Will likely be: \"Living in a lonely world\"\n});", "language": "javascript" } ] } [/block] Well, that's it for now! Happy hacking! **Cleverbot.io is free and open source, and will remain so.**
{"_id":"56d11579376b040b005b313b","link_url":"","excerpt":"","githubsync":"","hidden":false,"isReference":false,"__v":2,"project":"54fe41994759dc21005936fb","slug":"getting-started-with-ruby","category":"552745197d4a44170095170b","link_external":false,"sync_unique":"","user":"56ccc033b4cbcf0b004a6065","order":999,"title":"Getting started with Ruby","type":"basic","updates":[],"api":{"auth":"required","params":[],"results":{"codes":[{"language":"json","code":"{}","name":"","status":200},{"code":"{}","name":"","status":400,"language":"json"}]},"settings":"","url":""},"body":"# cleverbot.io\n\nTo install this package, you can use either RubyGems or Bundler.\n\n## RubyGems\nTo use RubyGems to install this package, enter the following in your console\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"gem install cleverbot_io\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\n\n## Bundler\nIf using Bundler to install this package, add the following to your application's Gemfile:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"gem('cleverbot_io')\",\n      \"language\": \"ruby\"\n    }\n  ]\n}\n[/block]\nAnd then execute the following in your console\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"bundle install\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\nBefore using this module, please get your API keys at [http://cleverbot.io/keys](http://cleverbot.io/keys).\n\nTo initialize the Cleverbot, require the module and create a new instance:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"require 'cleverbot'\\n\\nbot = Cleverbot.new('YOUR_API_USER', 'YOUR_API_KEY')\",\n      \"language\": \"ruby\"\n    }\n  ]\n}\n[/block]\n*cleverbot.io* allows you to save cleverbot sessions to access later. To utilize this feature, you can create a new instance with a third parameter.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"require 'cleverbot'\\n\\nbot = Cleverbot.new('YOUR_API_USER', 'YOUR_API_KEY', 'sessionname')\",\n      \"language\": \"ruby\"\n    }\n  ]\n}\n[/block]\nNow querying the cleverbot is simple, you pass the text to the `#say` method\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"bot.say('Just a small town girl')\\n# => Living in a lonely world\",\n      \"language\": \"ruby\"\n    }\n  ]\n}\n[/block]\nWell, that's it for now! Happy hacking!\n\n**Cleverbot.io is free and open source, and will remain so.**","createdAt":"2016-02-27T03:18:17.262Z","version":"54fe419a4759dc21005936fe","childrenPages":[]}

Getting started with Ruby


# cleverbot.io To install this package, you can use either RubyGems or Bundler. ## RubyGems To use RubyGems to install this package, enter the following in your console [block:code] { "codes": [ { "code": "gem install cleverbot_io", "language": "shell" } ] } [/block] ## Bundler If using Bundler to install this package, add the following to your application's Gemfile: [block:code] { "codes": [ { "code": "gem('cleverbot_io')", "language": "ruby" } ] } [/block] And then execute the following in your console [block:code] { "codes": [ { "code": "bundle install", "language": "shell" } ] } [/block] Before using this module, please get your API keys at [http://cleverbot.io/keys](http://cleverbot.io/keys). To initialize the Cleverbot, require the module and create a new instance: [block:code] { "codes": [ { "code": "require 'cleverbot'\n\nbot = Cleverbot.new('YOUR_API_USER', 'YOUR_API_KEY')", "language": "ruby" } ] } [/block] *cleverbot.io* allows you to save cleverbot sessions to access later. To utilize this feature, you can create a new instance with a third parameter. [block:code] { "codes": [ { "code": "require 'cleverbot'\n\nbot = Cleverbot.new('YOUR_API_USER', 'YOUR_API_KEY', 'sessionname')", "language": "ruby" } ] } [/block] Now querying the cleverbot is simple, you pass the text to the `#say` method [block:code] { "codes": [ { "code": "bot.say('Just a small town girl')\n# => Living in a lonely world", "language": "ruby" } ] } [/block] Well, that's it for now! Happy hacking! **Cleverbot.io is free and open source, and will remain so.**
# cleverbot.io To install this package, you can use either RubyGems or Bundler. ## RubyGems To use RubyGems to install this package, enter the following in your console [block:code] { "codes": [ { "code": "gem install cleverbot_io", "language": "shell" } ] } [/block] ## Bundler If using Bundler to install this package, add the following to your application's Gemfile: [block:code] { "codes": [ { "code": "gem('cleverbot_io')", "language": "ruby" } ] } [/block] And then execute the following in your console [block:code] { "codes": [ { "code": "bundle install", "language": "shell" } ] } [/block] Before using this module, please get your API keys at [http://cleverbot.io/keys](http://cleverbot.io/keys). To initialize the Cleverbot, require the module and create a new instance: [block:code] { "codes": [ { "code": "require 'cleverbot'\n\nbot = Cleverbot.new('YOUR_API_USER', 'YOUR_API_KEY')", "language": "ruby" } ] } [/block] *cleverbot.io* allows you to save cleverbot sessions to access later. To utilize this feature, you can create a new instance with a third parameter. [block:code] { "codes": [ { "code": "require 'cleverbot'\n\nbot = Cleverbot.new('YOUR_API_USER', 'YOUR_API_KEY', 'sessionname')", "language": "ruby" } ] } [/block] Now querying the cleverbot is simple, you pass the text to the `#say` method [block:code] { "codes": [ { "code": "bot.say('Just a small town girl')\n# => Living in a lonely world", "language": "ruby" } ] } [/block] Well, that's it for now! Happy hacking! **Cleverbot.io is free and open source, and will remain so.**
{"_id":"56e49644f0150e1700ce682a","__v":8,"body":"# cleverbot.io\n\n## Installation\nTo install this package, you must use Cargo. To install it, add it to the project's Cargo.toml file.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[dependencies]\\ncleverbot_io = \\\"*\\\"\",\n      \"language\": \"rust\"\n    }\n  ]\n}\n[/block]\nBefore using this module, please get your API keys at [http://cleverbot.io/keys](http://cleverbot.io/keys).\n\n## Usage\n\nTo initialize the Cleverbot, create a new instance. The instance *must* be mutable, otherwise the `say` function will not be accessible. Additionally, `new` takes three parameters: `String`, `String`, and `Option<String>`; you cannot use `str` values.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"extern crate cleverbot_io;\\n\\nuse cleverbot_io::{Cleverbot};\\n\\nfn main() {\\n    // Use an automatically generated reference nick by using None for the third parameter.\\n    let mut bot = Cleverbot::new(String::from(\\\"YOUR_API_KEY\\\"), String::from(\\\"YOUR_API_USER\\\"), None).unwrap();\\n}\",\n      \"language\": \"rust\"\n    }\n  ]\n}\n[/block]\n*cleverbot.io* allows you to save cleverbot sessions to access later. To utilize this feature, you can create a new instance by setting the third parameter to a `Some` value.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"extern crate cleverbot_io;\\n\\nuse cleverbot_io::{Cleverbot};\\n\\nfn main() {\\n    let mut bot = Cleverbot::new(String::from(\\\"YOUR_API_KEY\\\"), String::from(\\\"YOUR_API_USER\\\"), Some(String::from(\\\"Carlos\\\"))).unwrap();\\n}\",\n      \"language\": \"rust\"\n    }\n  ]\n}\n[/block]\nNow querying the cleverbot is simple, you pass the text to the `#say` method.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"println!(\\\"{}\\\", bot.say(\\\"Why am I still talking to you?\\\").unwrap());\",\n      \"language\": \"rust\"\n    }\n  ]\n}\n[/block]\nWell, that's it for now! Happy hacking!\n\n**Cleverbot.io is free and open source, and will remain so.**","hidden":false,"slug":"getting-started-with-rust","title":"Getting started with Rust","updates":["56e51b1a8f2e450e005dc00f","57baeb8f7c05760e003453e5"],"createdAt":"2016-03-12T22:20:52.739Z","excerpt":"","order":999,"sync_unique":"","user":"56ccc033b4cbcf0b004a6065","githubsync":"","type":"basic","api":{"auth":"required","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":""},"category":"552745197d4a44170095170b","isReference":false,"link_external":false,"link_url":"","project":"54fe41994759dc21005936fb","version":"54fe419a4759dc21005936fe","childrenPages":[]}

Getting started with Rust


# cleverbot.io ## Installation To install this package, you must use Cargo. To install it, add it to the project's Cargo.toml file. [block:code] { "codes": [ { "code": "[dependencies]\ncleverbot_io = \"*\"", "language": "rust" } ] } [/block] Before using this module, please get your API keys at [http://cleverbot.io/keys](http://cleverbot.io/keys). ## Usage To initialize the Cleverbot, create a new instance. The instance *must* be mutable, otherwise the `say` function will not be accessible. Additionally, `new` takes three parameters: `String`, `String`, and `Option<String>`; you cannot use `str` values. [block:code] { "codes": [ { "code": "extern crate cleverbot_io;\n\nuse cleverbot_io::{Cleverbot};\n\nfn main() {\n // Use an automatically generated reference nick by using None for the third parameter.\n let mut bot = Cleverbot::new(String::from(\"YOUR_API_KEY\"), String::from(\"YOUR_API_USER\"), None).unwrap();\n}", "language": "rust" } ] } [/block] *cleverbot.io* allows you to save cleverbot sessions to access later. To utilize this feature, you can create a new instance by setting the third parameter to a `Some` value. [block:code] { "codes": [ { "code": "extern crate cleverbot_io;\n\nuse cleverbot_io::{Cleverbot};\n\nfn main() {\n let mut bot = Cleverbot::new(String::from(\"YOUR_API_KEY\"), String::from(\"YOUR_API_USER\"), Some(String::from(\"Carlos\"))).unwrap();\n}", "language": "rust" } ] } [/block] Now querying the cleverbot is simple, you pass the text to the `#say` method. [block:code] { "codes": [ { "code": "println!(\"{}\", bot.say(\"Why am I still talking to you?\").unwrap());", "language": "rust" } ] } [/block] Well, that's it for now! Happy hacking! **Cleverbot.io is free and open source, and will remain so.**
# cleverbot.io ## Installation To install this package, you must use Cargo. To install it, add it to the project's Cargo.toml file. [block:code] { "codes": [ { "code": "[dependencies]\ncleverbot_io = \"*\"", "language": "rust" } ] } [/block] Before using this module, please get your API keys at [http://cleverbot.io/keys](http://cleverbot.io/keys). ## Usage To initialize the Cleverbot, create a new instance. The instance *must* be mutable, otherwise the `say` function will not be accessible. Additionally, `new` takes three parameters: `String`, `String`, and `Option<String>`; you cannot use `str` values. [block:code] { "codes": [ { "code": "extern crate cleverbot_io;\n\nuse cleverbot_io::{Cleverbot};\n\nfn main() {\n // Use an automatically generated reference nick by using None for the third parameter.\n let mut bot = Cleverbot::new(String::from(\"YOUR_API_KEY\"), String::from(\"YOUR_API_USER\"), None).unwrap();\n}", "language": "rust" } ] } [/block] *cleverbot.io* allows you to save cleverbot sessions to access later. To utilize this feature, you can create a new instance by setting the third parameter to a `Some` value. [block:code] { "codes": [ { "code": "extern crate cleverbot_io;\n\nuse cleverbot_io::{Cleverbot};\n\nfn main() {\n let mut bot = Cleverbot::new(String::from(\"YOUR_API_KEY\"), String::from(\"YOUR_API_USER\"), Some(String::from(\"Carlos\"))).unwrap();\n}", "language": "rust" } ] } [/block] Now querying the cleverbot is simple, you pass the text to the `#say` method. [block:code] { "codes": [ { "code": "println!(\"{}\", bot.say(\"Why am I still talking to you?\").unwrap());", "language": "rust" } ] } [/block] Well, that's it for now! Happy hacking! **Cleverbot.io is free and open source, and will remain so.**
{"_id":"5889132d2ddcca0f003b0713","body":"See the [GoDoc page for cleverbot](https://godoc.org/github.com/CleverbotIO/go-cleverbot.io)","isReference":false,"link_external":false,"next":{"pages":[],"description":""},"api":{"settings":"","auth":"required","params":[],"url":"","results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"code":"{}","name":"","status":400,"language":"json"}]}},"githubsync":"","link_url":"","project":"54fe41994759dc21005936fb","slug":"getting-started-with-go","type":"basic","version":"54fe419a4759dc21005936fe","__v":1,"category":"552745197d4a44170095170b","createdAt":"2017-01-25T21:05:49.155Z","excerpt":"","hidden":false,"order":999,"title":"Getting started with Go","updates":["58eb5439c796c01900b6598c"],"user":"56ccc033b4cbcf0b004a6065","sync_unique":"","childrenPages":[]}

Getting started with Go


See the [GoDoc page for cleverbot](https://godoc.org/github.com/CleverbotIO/go-cleverbot.io)
See the [GoDoc page for cleverbot](https://godoc.org/github.com/CleverbotIO/go-cleverbot.io)