Skip to content

Commit a39829d

Browse files
committed
Improved the pyramidSparkBot example documentation
1 parent 8dd0846 commit a39829d

File tree

2 files changed

+31
-2
lines changed

2 files changed

+31
-2
lines changed

examples/pyramidSparkBot/README.rst

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,33 @@
11
Documentation
22
=============
33

4-
Put a brief description of 'Pyramid Spark Bot application'.
4+
A simple bot script, built on Pyramid using Cornice
5+
6+
This sample script leverages the Pyramid web framework (https://trypyramid.com/) with
7+
Cornice (https://cornice.readthedocs.io). By default the web server will be reachable at
8+
port 6543 you can change this default if desired (see `pyramidSparkBot.ini`).
9+
10+
ngrok (https://ngrok.com/) can be used to tunnel traffic back to your server
11+
if your machine sits behind a firewall.
12+
13+
You must create a Spark webhook that points to the URL where this script is
14+
hosted. You can do this via the CiscoSparkAPI.webhooks.create() method.
15+
16+
Additional Spark webhook details can be found here:
17+
https://developer.ciscospark.com/webhooks-explained.html
18+
19+
A bot must be created and pointed to this server in the My Apps section of
20+
https://developer.ciscospark.com. The bot's Access Token should be added as a
21+
'SPARK_ACCESS_TOKEN' environment variable on the web server hosting this
22+
script.
23+
24+
This script supports Python versions 2 and 3.
25+
26+
# Running the bot
27+
28+
In order to execute the bot, you need to
29+
30+
```
31+
python setup.py develop
32+
pserve --reload pyramidSparkBot
33+
```

examples/pyramidSparkBot/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
packages=find_packages(),
2525
include_package_data=True,
2626
zip_safe=False,
27-
install_requires=['cornice', 'waitress'],
27+
install_requires=['cornice', 'waitress', 'ciscosparkapi'],
2828
entry_points="""\
2929
[paste.app_factory]
3030
main=pyramidSparkBot:main

0 commit comments

Comments
 (0)