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

HTTP Tracker Client: add scrape request #651

Conversation

josecelano
Copy link
Member

@josecelano josecelano commented Jan 29, 2024

Usage:

cargo run --bin http_tracker_client scrape https://tracker.torrust-demo.com 9c38422213e30bff212b30c360d26f9a02136422 | jq

Response:

{
  "9c38422213e30bff212b30c360d26f9a02136422": {
    "complete": 0,
    "downloaded": 0,
    "incomplete": 1
  }
}

An added scaffolding for scrape command.
```console
cargo run --bin http_tracker_client scrape http://127.0.0.1:7070 9c38422213e30bff212b30c360d26f9a02136422 9c38422213e30bff212b30c360d26f9a02136423 | jq
```

```json
{
  "9c38422213e30bff212b30c360d26f9a02136422": {
    "complete": 0,
    "downloaded": 0,
    "incomplete": 0
  },
  "9c38422213e30bff212b30c360d26f9a02136423": {
    "complete": 0,
    "downloaded": 0,
    "incomplete": 0
  }
}
```
@josecelano josecelano self-assigned this Jan 29, 2024
@josecelano josecelano added this to the v3.0.0 milestone Jan 29, 2024
@josecelano josecelano linked an issue Jan 29, 2024 that may be closed by this pull request
Copy link

codecov bot commented Jan 29, 2024

Codecov Report

Attention: 22 lines in your changes are missing coverage. Please review.

Comparison is base (0f573b6) 75.22% compared to head (0624bf2) 75.05%.

Files Patch % Lines
...bit_torrent/tracker/http/client/requests/scrape.rs 0.00% 14 Missing ⚠️
...it_torrent/tracker/http/client/responses/scrape.rs 0.00% 8 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #651      +/-   ##
===========================================
- Coverage    75.22%   75.05%   -0.18%     
===========================================
  Files          136      136              
  Lines         8881     8902      +21     
===========================================
  Hits          6681     6681              
- Misses        2200     2221      +21     

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

@josecelano
Copy link
Member Author

ACK 0624bf2

@josecelano josecelano merged commit c526cc1 into torrust:develop Jan 29, 2024
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

HTTP Tracker Client: add scrape request
1 participant