clever-cli
is a command line tool to access the Clever API.
You can install an official release from the Github releases page or install from source via:
go get github.com/Clever/clever-cli
$ clever-cli --token=DEMO_TOKEN teachers list
$ clever-cli --token=DEMO_TOKEN sections list
$ clever-cli --token=DEMO_TOKEN sections list --where='{"subject":"math"}'
$ clever-cli --token=DEMO_TOKEN teachers get EXAMPLEID
clever-cli [options] endpoint action [action options]
There is one required command line flag:
- token: API token to use for authentication
And three optional ones:
- help=false: if true, display help and exit
- host="https://api.clever.com": base URL of Clever API
- output="csv": output method. supported options: csv, json
Which endpoint to query in the Clever API.
Valid options are students
, schools
, sections
, or teachers
.
What you want to do with that endpoint. Valid options are list (which returns all the results), and get (which returns a specific object by Clever ID).
A set of optional command line flags that modify the request to the Clever API. Varies based on action type.
- where="": a JSON-stringified where query parameter
- Get takes a single positional argument, which is the Clever ID of the object you wish to get.
Set this repository up in the standard location in your GOPATH
, i.e. $GOPATH/src/github.com/Clever/clever-cli
.
Once this is done, make test
runs the tests.
The release process requires a cross-compilation toolchain.
gox
can install the toolchain with one command: gox -build-toolchain
.
From there you can build release tarballs for different OS and architecture combinations with make release
.
Official releases are listed on the releases page. To create an official release:
-
On
master
, bump the version in theVERSION
file in accordance with semver. You can do this withgitsem
, but make sure not to create the tag, e.g.gitsem -tag=false patch
. -
Push the change to Github. Drone will automatically create a release for you.
Please view the dev-handbook for instructions.