Git Product home page Git Product logo

node-sparkbot-samples's Introduction

Cisco Spark Bot examples in nodejs

Interested in creating your own Cisco Spark bots ?

Go through the examples below.

If you feel inspired, follow the guides to run your own version of these bots: Guide to run on Cloud9 and Guide to run locally.

Or pick a template that suits your scenario, and customize it.

Note that these bot samples code leverage the node-sparkbot Bot framework.

and if you're new to Cisco Spark Apps, note that DevNet provides 10 to 20' Learning labs.

Provides instant access to Cisco Spark technical data.

Features illustrated by this example:

  • Help command to display available commands
  • About command to get meta info about the bot
  • Welcome message as the bot is added in a room
  • Fallback message if a command is not recognized
  • Uses "node-sparky" library to wrap calls to the Cisco Spark REST API

This bot can be run as is with either a Developer or a Bot access token

Invite [email protected] to meet the bot.

Fetches the identifier of the room in which this bot has just been added, pushes the roomId via a direct message, and leaves the inquired room right away.

Features illustrated by this example:

  • Help command to display available commands
  • About command to get meta info about the bot
  • Fallback message if a command is not recognized
  • Send a direct message and leaves the room
  • Uses "node-sparky" library to wrap calls to the Cisco Spark REST API

Invite [email protected] to meet the bot.

Computes stats for the room it is invoked from.

Features illustrated by this example:

  • Help message to display bot commands
  • Welcome message as the bot is added in a room
  • Custom command prefix #
  • Markdown formatting with lists & mentions
  • Runs with a Developer account
  • Uses "node-sparky" library to wrap calls to the Cisco Spark REST API

Note that this webhook must be run with a Developer access token (either your's or a fake Spark account), because we must fetch all messages from rooms, not only those where bot is mentionned.

Invite [email protected] to meet the bot.

Tells you about upcoming DevNet events.

Features illustrated by this example:

  • Help command to display available commands
  • About command to get meta info about the bot
  • Welcome message as the bot is added in a room
  • Fallback message if a command is not recognized
  • Command with integer argument
  • Invokes a public REST API: devnet-events-api
  • Markdown formatting with lists and hyperlinks
  • Uses "node-sparky" library to wrap calls to the Cisco Spark REST API

Invite [email protected] to meet the bot.

A simple template to start from.

Features illustrated by this example:

  • Welcome message as the bot is added in a room
  • Help command to display available commands
  • Fallback message if a command is not recognized
  • Markdown formatting with mention
  • Leverages the "node-sparkclient" library to wrap calls to the Cisco Spark REST API

This bot can be run as is with either a Developer or a Bot access token

node-sparkbot-samples's People

Contributors

objectisadvantag avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.