-
Notifications
You must be signed in to change notification settings - Fork 92
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/products device get var #551
Conversation
…ers of lib/api.js
…variable from a product device
getValue({ time, product, params: { device, variableName } }){ | ||
if (product){ | ||
if (!device){ | ||
throw usageError( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😍 changing out the throwing of generic errors for named ones
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a great changeset to me, cli/variable.js
reads a lot better now with the flow changes and named errors.
Reading the e2e
test changes made me realize I could/should use the CLI's end to end tests against my locally running stack as an additional layer of validation, I'll let you know how that goes when I try it later today.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 from me for the approach and CLI parameters
Description
Adds support for optional
--product <id>
flag to theparticle variable get
command to fetch a variable from a product device (ch)How to Test
Note: requires you to have a Particle product with one or more devices
Run
particle variable get --help
and explore the command and options.Completeness