Skip to content

ykankaya/Cleverbot.Net

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Cleverbot.Net

NuGet GitHub issues GitHub stars GitHub forks Twitter

Looking for a fast way to use Cleverbot.io in your application? Do you hate dealing with HTTP requests? You found the right tool!

This project uses cleverbot.io.

How to

  1. Create a Visual Studio .NET 4.5 solution and save it.
  2. In Visual Studio menu bar, go to Tools -> NuGet Package Manager -> Package Manager Console.
  3. Type Install-Package Cleverbot.Net and wait.
  4. Aquire your API credentials here.

Then create a CleverbotSession and send anything:

var session  = CleverbotSession.NewSession("apiUser", "apiKey");
var response = session.Send("Hello.");

A simple console client:

using System;
using Cleverbot.Net;

class Program
{
    static void Main()
    {
        string message;
        var session = CleverbotSession.NewSession("apiUser", "apiKey");
        do {
            Console.Write("Type your message: ");
            message = Console.ReadLine();
            Console.Write("Bot: ");
            Console.WriteLine(session.Send(message));
        } while (message.ToLower().Trim() != "exit");
    }
}

Asynchronous requests

This wrapper allows you to use the asynchronous functionality. Basically, you just await the methods and add Async to the end of their names.

var session  = await CleverbotSession.NewSessionAsync("apiUser", "apiKey");
var response = await session.SendAsync("Hello.");

About

🤖 A .NET wrapper around the cleverbot.io API, easy to use, supports asynchronous requests

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 100.0%