@butlerbot/sdk
Version:
The official ButlerBot SDK
35 lines (22 loc) • 739 B
Markdown
ButlerBot SDK is a JavaScript library that provides a simple way to interact with the [ButlerBot](https://butlerbot.net/) API.
Grab an API key at [ButlerBot](https://butlerbot.net/) and install the package:
```bash
npm i @butlerbot/sdk
```
- ButlerBot API key
```typescript
import { ButlerBotClient } from "@butlerbot/sdk";
const client = new ButlerBotClient({
apiKey: "your_api_key_here",
});
const convo = client.createConversation();
convo.send("Hey there Alfred!", (res) => {
if (!res.success) return;
const { type, payload } = res.data.response;
console.log(type, payload); // message { message: "Good day", ... }
});
```