-
Notifications
You must be signed in to change notification settings - Fork 51
Extract Tracker API Client packages #689
Copy link
Copy link
Labels
Code Cleanup / RefactoringTidying and Making NeatTidying and Making Neat
Milestone
Description
Relates to: torrust/torrust-index#806
Relates to: #255 (comment)
We are using a Tracker API Client in test code.
That client is duplicated in the Index because the Index calls the Tracker API:
We should extract that login into an independent package so that the Index can use it and we remove that duplicate code.
Before extracting the package we should clean it and make it ready for production. Currently, is not ready because
- The URL schema is hardcoded to
http://. - It panics if the HTTP fails. We should return an error and let the user handle it.
- We should decide if we expose
requesterrors or we wrap them.
I propose to create this packages:
- folder (crates.io package name)
packages/api-types(torrust-tracker-api-types)packages/api-client(torrust-tracker-api-client) <- depends ontorrust-tracker-api-typespackages/api-server(torrust-tracker-api-server) <- depends ontorrust-tracker-api-types. Maybe in the future
IMPORTANT: the implementation in the Index was improved. We have to apply those improvements to this client.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Code Cleanup / RefactoringTidying and Making NeatTidying and Making Neat
Type
Projects
Status
Done