From df67741c2035a7e676f122f19daa1ca7c102d287 Mon Sep 17 00:00:00 2001 From: Alvin Reyes Date: Thu, 29 Dec 2016 12:27:15 -0500 Subject: [PATCH] Update README.md --- README.md | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 65 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 84d3063..1c5624a 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,65 @@ -# Kik-BotMill -A Java framework for building bots on Kik. \ No newline at end of file +# Kik-BotMill - Tools to Mill Kik Bots + +Inspired by our first ever Bot Framework [FB-BotMill](https://github.com/BotMill/fb-botmill) + +Kik-BotMill is designed to ease the process of developing, designing and running bots that exist inside Kik Messenger. + +It provides a semantic Java API that can be imported on your Java EE Project to send and receive messages from Kikso that developers can focus on developing the actual application instead of dealing with Kik API endpoints. + +**

Getting Started

** +Much like how FB-BotMill can be configured, the Kik-BotMill can be imported as a dependency via Maven. + + + co.aurasphere.botmill + kik-botmill + 1.0.0 + + +Once you've imported the API. You need to register the KikBotMillServlet. To do that, create a Servlet project in your IDE and add this to your web.xml: + + + myKikBot + co.aurasphere.botmill.Kik.KikBotMillServlet + + bot-definition-class + com.mypackage.MyKikBotDefinitionClass + + 0 + + + myKikBot + /myKikBot + + + +This will register a servlet named myKikBot to the path /myKikBot. The bot-definition-class parameters is a class that implements the KikBotDefinition interface or extends the AbstractKikBot class. + +**

Creating a behaviour class

** +To complete your first bot, all you have to do is write the definition class. This class will describe your bot behavior. Here's an example: + + public class MyBotBehaviour extends AbstractKikBot { + public void defineBehavior() { + addActionFrame(new MessageEvent("text message"), new MessageAutoReply("simple text message")); + } + } + +The example above will basically create an event that will catch a response with text = "text message". A Reply object is then called to respond to this text message. + +There are several types of events and reply that can be used. + +**

Examples

** + +# Developing with Kik-BotMill + +Table of Contents +* [Sending Messages](#sending-messages) +* [Receiving Messages](#receiving-messages) +* [Advance Topics](#advance-topics) + +**

Sending Messages

** +**

Receiving Messages

** +**

Advance Topics

** + +For more information on other callbacks, framework features or how to create a different kind of reply, check out the official wiki. + +Copyright (c) 2017 Donato Rimenti, Alvin Reyes