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

general improvements #2

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

general improvements #2

wants to merge 3 commits into from

Conversation

g1-1-1
Copy link

@g1-1-1 g1-1-1 commented Jun 27, 2023

this is untested, please test this and make sure it works properly.

- refactor error handling to use `result` types
- use proper string concatenation methods for efficiency
- make API base URL configurable
- update struct names to follow snake_case convention
- add inline comments and documentation for clarity
- separate token validation and object initialization logic into distinct functions
- replace unwrap and panic with proper error handling using `result` and the `?` operator
- remove unnecessary string formatting in API requests for better performance
- provide more informative error messages for token validation and network errors
- extracts common functionality into helper methods
- uses `result` for error handling
- more constants
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.

1 participant