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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/products device get var #551

Merged
merged 9 commits into from
Feb 12, 2020

Conversation

busticated
Copy link
Contributor

@busticated busticated commented Feb 11, 2020

Description

Adds support for optional --product <id> flag to the particle 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

  • User is totes amazing for contributing!
  • Contributor has signed CLA
  • Problem and solution clearly stated
  • Tests have been provided
  • Docs have been updated
  • CI is passing

@busticated busticated changed the base branch from master to feature/products February 11, 2020 04:48
getValue({ time, product, params: { device, variableName } }){
if (product){
if (!device){
throw usageError(
Copy link
Contributor

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

Copy link
Contributor

@wraithan wraithan left a 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.

Copy link
Member

@monkbroc monkbroc left a 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

@busticated busticated merged commit cf02b6a into feature/products Feb 12, 2020
@busticated busticated deleted the feature/products-device-get-var branch February 12, 2020 19:51
@busticated busticated mentioned this pull request Apr 19, 2020
6 tasks
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

Successfully merging this pull request may close these issues.

3 participants