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

Refactor: improve REST API client #1335

Merged

Conversation

josecelano
Copy link
Member

@josecelano josecelano commented Feb 28, 2025

Refactor: improve REST API client:

  • Add a timeout to the requests.
  • Return an error in the constructor if it can't build the HTTP client.
  • Extract constants.

- Add a timeout to the requests.
- Return an error in the construction if it can't build the HTTP client.
- Extract constants.
@josecelano josecelano self-assigned this Feb 28, 2025
@josecelano josecelano added the Code Cleanup / Refactoring Tidying and Making Neat label Feb 28, 2025
@josecelano josecelano added the - Developer - Torrust Improvement Experience label Feb 28, 2025
@josecelano josecelano linked an issue Feb 28, 2025 that may be closed by this pull request
@josecelano
Copy link
Member Author

ACK 89b0bfd

Copy link

codecov bot commented Feb 28, 2025

Codecov Report

Attention: Patch coverage is 94.73684% with 1 line in your changes missing coverage. Please review.

Project coverage is 81.52%. Comparing base (1f69e02) to head (89b0bfd).
Report is 2 commits behind head on develop.

Files with missing lines Patch % Lines
packages/rest-tracker-api-client/src/v1/client.rs 94.73% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1335      +/-   ##
===========================================
- Coverage    81.53%   81.52%   -0.02%     
===========================================
  Files          230      230              
  Lines        16358    16368      +10     
  Branches     16358    16368      +10     
===========================================
+ Hits         13338    13344       +6     
  Misses        2792     2792              
- Partials       228      232       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@josecelano josecelano merged commit 809b85b into torrust:develop Feb 28, 2025
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- Developer - Torrust Improvement Experience Code Cleanup / Refactoring Tidying and Making Neat
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extract Tracker API Client packages
1 participant