Add Node.js package as CLI client
christian-bromann opened this issue ยท 5 comments
๐ Feature Proposal
Have you read the contributing guidelines on issues?
- Yes
Description
Our Node.js client allows to fetch our API through the command line, e.g.:
$ npm install -g saucelabs
Export credentials:
$ export SAUCE_USERNAME=<username>
$ export SAUCE_ACCESS_KEY=<access-key>
Access our API:
$ sl -u listJobs $SAUCE_USERNAME --limit 5 --region eu
{ jobs:
[ { id: '19dab74f8fd848518f8d2c2cee3a6fbd' },
{ id: 'dc08ca0c7fa14eee909a093d11567328' },
{ id: '5bc6f70c777b4ae3bf7909a40f5ee41b' },
{ id: 'f40fe7b044754eaaa5f5a130406549b5' },
{ id: 'd1553f71f910402893f1e82a4dcb6ca6' } ] }
Motivation
I believe this can help customer a lot to explore our API and their data.
Example
@sweeneyskirt-sl do you want to do this one? @christian-bromann You're thinking this belongs in the following page: https://docs.saucelabs.com/dev/api/#accessing-the-apis
You're thinking this belongs in the following page: https://docs.saucelabs.com/dev/api/#accessing-the-apis
Yes, in fact I think we should provide an example of the Node.js CLI client in all instances where we have a curl example using tabs so user can decide whether they want to test the API with curl or sl
.
This is a good idea. I will add it to my roadmap. Thanks, @christian-bromann! Where can I find more information about this CLI -- it is not in our official documentation. Should it be?
Should it be?
I think so. In fact we should have sections on our API bindings in general. We have one for Node.js (this one mentioned above) and one for Java.
Informations on supported endpoints and commands can be found here. I don't think we need exhaustive docs given that the package should document itself properly. But for interacting with the API it would be great to include this CLI tool as option and have a page with some instructions on how to use the package.
@sweeneyskirt-sl any updates on this?