Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Node.js package as CLI client #519

Open
1 task done
christian-bromann opened this issue Jul 14, 2021 · 5 comments
Open
1 task done

Add Node.js package as CLI client #519

christian-bromann opened this issue Jul 14, 2021 · 5 comments
Assignees

Comments

@christian-bromann
Copy link
Contributor

馃殌 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

@Tacktician
Copy link
Contributor

@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

@christian-bromann
Copy link
Contributor Author

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.

@sweeneyskirt-sl
Copy link
Contributor

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?

@christian-bromann
Copy link
Contributor Author

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.

@Tacktician
Copy link
Contributor

@sweeneyskirt-sl any updates on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants