This project provides some command line clients for interacting with Cisco Spark, and Smartsheet web API endpoints. These command line utilities grew out of the development of the REST server, also in this project, that provides an "IFTTN"-likeregistration to relay discussions in a Smartsheet to Spark, and vice-versa.
TBD...
The REST server is started from the bin/server binary, and listens on port :8000
The CLI tool is run from bin/spark, and provides several options for interacting with Spark via the web API.
This tool expects that the Spark API Token is either passed in via the -apitoken flag, or in the SPARK_API_TOKEN environment variable.
bin/spark room listwill list the rooms visible to the userbin/spark hook listlists the hooks registered by the userbin/spark hook addregisters a new callback hook, for when messages are posted to Sparkbin/spark hook deletewill de-register a callback hookbin/spark messages listwill list messages in a given roombin/spark messages addto post a new message to a specified room- TBD...
TBD...
Install gb
go get -u github.com/constabulary/gb/...
Fetch the project to a directory (doesn't need to be under GOPATH at all!)
git clone https://github.com/MustWin/spark-smartsheet.git
cd spark-smartsheet
To build the project:
$ gb build
Execute the api main command:
$ ./bin/server -v
To run the tests:
$ gb test
That's it!
{
"foo@bar.baz": {
"Email": "foo@bar.baz",
"Tokens": {
"api": "Zm9vQGJhci5iYXo68qTJnD1i0izZxHQn-kZk4iKgUTZoibIX0OnAaBj1yDc="
}
}
}