
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
=========
A thin client around the botmock API.
npm install botmock
In order to get started with this client, you'll need to get your access token from https://botmock.com. After you sign in, go to the Account Settings page by clicking on your profile picture on the top right. Then click on API from the left side menu. Give your token a name, and hit Create. Remember to note down your token since it will not be shown after it is generated.
// Import the botmock js library
const Botmock = require('botmock-js');
// Create a client
const client = new Botmock({
"api_token": API_TOKEN, // fill in your API_TOKEN instead.
"debug": false // this flag is optional.
});
In general, the client acts like a thin wrapper around the REST API. You can read about the API here: http://docs.botmock.com/
The client allows easy access to 3 types of resources.
client.teams(team_id)
Where team_id
is optional. If not given, this will return all of the teams.
Example Response:
[
{
"id": 38881,
"name": "First Team",
"photo": "https://www.gravatar.com/avatar/00f062fb089de61b9a7e8033bc40109a.jpg?s=200&d=identicon",
"created_at": {
"date": "2017-01-10 20:45:21.000000",
"timezone_type": 3,
"timezone": "UTC"
}
},
{
"id": 133244,
"name": "Second team",
"photo": "https://www.gravatar.com/avatar/1c5a10ff164629b4da3be8ef5f7fe18d.jpg?s=200&d=identicon",
"created_at": {
"date": "2017-07-07 19:22:50.000000",
"timezone_type": 3,
"timezone": "UTC"
}
},
{
"id": 183331,
"name": "Third Team",
"photo": "https://www.gravatar.com/avatar/7c507a4e30c13b100a7175f494647e83.jpg?s=200&d=identicon",
"created_at": {
"date": "2017-08-12 03:38:19.000000",
"timezone_type": 3,
"timezone": "UTC"
}
}
]
client.projects(team_id, project_id)
Where team_id
is required, and project_id
is optional. If project_id
is omitted, it will return all of the projects for the given team.
Example Response:
{
"id": "16f1c520-05c6-11e7-bc31-5554df9b496b",
"name": "Kindly",
"created_at": "2017-03-10 19:16:40",
"updated_at": "2017-09-15 14:15:59",
"type": "mock",
"platform": "facebook"
}
client.boards(team_id, project_id, board_id)
Where team_id
, project_id
are required, and board_id
is optional. If board_id
is omitted, it will return all of the boards for the given team and project.
Example Response:
{
"board": {
"root_messages": [
"6af54577-593a-436a-866f-11be95c55b64"
],
"messages": [
{
"message_id": "6af54577-593a-436a-866f-11be95c55b64",
"message_type": "user_reply",
"next_message_ids": [
"c728f3be-218f-40d0-bc83-d92bfca96022"
],
"previous_message_ids": [],
"is_root": true,
"payload": {
"text": "Search Flights"
}
},
{
"message_id": "c728f3be-218f-40d0-bc83-d92bfca96022",
"message_type": "text",
"next_message_ids": [
"e18708cb-2dcf-4545-8c14-7f8c39a7f9f0"
],
"previous_message_ids": [
"6af54577-593a-436a-866f-11be95c55b64"
],
"is_root": false,
"payload": {
"text": "Sweet! I love finding people the least agonizing flights! Say something like \"non-stop flight on United from SFO to YOW 10/02 to 10/09\""
}
},
...
]
},
"created_at": {
"date": "2017-09-20 23:47:47.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"updated_at": {
"date": "2017-09-20 23:47:47.000000",
"timezone_type": 3,
"timezone": "UTC"
}
}
npm test
👍🎉 First off, thanks for taking the time to contribute! 🎉👍
When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.
We adopt ISC.
FAQs
Javascript module for interacting with Botmock API
We found that botmock demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.