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

feat(cli/lib): fix words requests and add environ. variables for login #64

Merged
merged 3 commits into from Feb 9, 2023

Conversation

jeertmans
Copy link
Owner

This closes #62 by adding environment variables for API key. It also fixes words requests, both on the library (missing struct flattening) and on the CLI side (Option). The latter solution was found in discussion: clap-rs/clap#4427.

This closes #62 by adding environment variables for API key. It also fixes words requests, both on the library (missing struct flattening) and on the CLI side (Option<T>). The latter solution was found in discussion: clap-rs/clap#4427.
@jeertmans jeertmans added bug Something isn't working cli Related to the CLI enhancement New feature or request library Relate to the library (i.e., crate) labels Feb 8, 2023
@github-actions
Copy link

github-actions bot commented Feb 8, 2023

Thank you for updating CHANGELOG.md! Always feel free to edit it.
See Keep A Changelog for more details.

@jeertmans
Copy link
Owner Author

Waiting response for #4697 to see if I can avoid adding Option in the WordsRequest struct, which is a breaking change...

If I cannot avoid, I will create another structure WordsRequestArgs that implements TryInto<WordsRequest>.

@jeertmans
Copy link
Owner Author

Seems like the problem mentioned above is "work in progress" for Clap, but I implemented a workaround using From (that panics if LoginArgs are None for the default WordsRequestArgs). This should be sufficient for now, waiting for update on Clap's side.

@jeertmans jeertmans merged commit 2d6c957 into main Feb 9, 2023
@jeertmans jeertmans deleted the fix-words-requests branch February 9, 2023 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cli Related to the CLI enhancement New feature or request library Relate to the library (i.e., crate)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: environment variable support for API key, and username
1 participant