1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//! Tracker statistics API context.
//!
//! The tracker collects statistics about the number of torrents, seeders,
//! leechers, completed downloads, and the number of requests handled.
//!
//! # Endpoints
//!
//! - [Get tracker statistics](#get-tracker-statistics)
//!
//! # Get tracker statistics
//!
//! `GET /stats`
//!
//! Returns the tracker statistics.
//!
//! **Example request**
//!
//! ```bash
//! curl "http://127.0.0.1:1212/api/v1/stats?token=MyAccessToken"
//! ```
//!
//! **Example response** `200`
//!
//! ```json
//! {
//! "torrents": 0,
//! "seeders": 0,
//! "completed": 0,
//! "leechers": 0,
//! "tcp4_connections_handled": 0,
//! "tcp4_announces_handled": 0,
//! "tcp4_scrapes_handled": 0,
//! "tcp6_connections_handled": 0,
//! "tcp6_announces_handled": 0,
//! "tcp6_scrapes_handled": 0,
//! "udp4_connections_handled": 0,
//! "udp4_announces_handled": 0,
//! "udp4_scrapes_handled": 0,
//! "udp6_connections_handled": 0,
//! "udp6_announces_handled": 0,
//! "udp6_scrapes_handled": 0
//! }
//! ```
//!
//! **Resource**
//!
//! Refer to the API [`Stats`](crate::servers::apis::v1::context::stats::resources::Stats)
//! resource for more information about the response attributes.