From cfd31b86b5a71d059dd9b6f24f0df5b20ac9c0ca Mon Sep 17 00:00:00 2001 From: Shagon94 Date: Sun, 30 Oct 2022 18:32:51 +0100 Subject: qBittorrent service (#540) qBittorrent service --- dummy-data/README.md | 13 +++---- dummy-data/qBittorrent/api/v2/torrents/info | 53 +++++++++++++++++++++++++++++ dummy-data/qBittorrent/api/v2/transfer/info | 10 ++++++ 3 files changed, 70 insertions(+), 6 deletions(-) create mode 100644 dummy-data/qBittorrent/api/v2/torrents/info create mode 100644 dummy-data/qBittorrent/api/v2/transfer/info (limited to 'dummy-data') diff --git a/dummy-data/README.md b/dummy-data/README.md index eeff4ec..6db4712 100644 --- a/dummy-data/README.md +++ b/dummy-data/README.md @@ -1,15 +1,16 @@ # Dummy data -This directory content makes possible to test custom services cards or create a demo without actually running the service. +This directory content makes possible to test custom services cards or create a demo without actually running the service. The principle is simple: save a sample output of the API used in the service in a static file in this directory. The path must be identical as the service endpoint to be used seamlessly. -## How to add a new services sample: +## How to add a new services sample -- create a directory for your service, and any sub-folder existing in the service api path. +- create a directory for your service, and any sub-folder existing in the service api path. - save the api output in a file named after the service endpoint. Example: -``` + +```sh mkdir pihole -curl http://my-pihole.me/admin/api.php -o pihole/api.php # /admin is omited because for PiHole, the implementation expect it to be in the base url (`url` or `enpoint` property) -``` \ No newline at end of file +curl http://my-pihole.me/admin/api.php -o pihole/api.php # /admin is omited because for PiHole, the implementation expect it to be in the base url (`url` or `endpoint` property) +``` diff --git a/dummy-data/qBittorrent/api/v2/torrents/info b/dummy-data/qBittorrent/api/v2/torrents/info new file mode 100644 index 0000000..e1bc722 --- /dev/null +++ b/dummy-data/qBittorrent/api/v2/torrents/info @@ -0,0 +1,53 @@ +[ + { + "added_on": 1666985518, + "amount_left": 0, + "auto_tmm": false, + "availability": -1, + "category": "", + "completed": 1474873344, + "completion_on": 1666985584, + "content_path": "/downloads/ubuntu-22.04.1-live-server-amd64.iso", + "dl_limit": -1, + "dlspeed": 0, + "download_path": "", + "downloaded": 1513976240, + "downloaded_session": 0, + "eta": 8640000, + "f_l_piece_prio": false, + "force_start": false, + "hash": "cf3ea75e2ebbd30e0da6e6e215e2226bf35f2e33", + "infohash_v1": "cf3ea75e2ebbd30e0da6e6e215e2226bf35f2e33", + "infohash_v2": "", + "last_activity": 1666985588, + "magnet_uri": "magnet:?xt=urn:btih:cf3ea75e2ebbd30e0da6e6e215e2226bf35f2e33&dn=ubuntu-22.04.1-live-server-amd64.iso&tr=https%3a%2f%2ftorrent.ubuntu.com%2fannounce&tr=https%3a%2f%2fipv6.torrent.ubuntu.com%2fannounce", + "max_ratio": 0, + "max_seeding_time": -1, + "name": "ubuntu-22.04.1-live-server-amd64.iso", + "num_complete": 0, + "num_incomplete": 583, + "num_leechs": 0, + "num_seeds": 0, + "priority": 0, + "progress": 1, + "ratio": 1.7163413343924075e-05, + "ratio_limit": -2, + "save_path": "/downloads/", + "seeding_time": 4, + "seeding_time_limit": -2, + "seen_complete": 1666985584, + "seq_dl": false, + "size": 1474873344, + "state": "pausedUP", + "super_seeding": false, + "tags": "", + "time_active": 69, + "total_size": 1474873344, + "tracker": "", + "trackers_count": 2, + "up_limit": -1, + "uploaded": 25985, + "uploaded_session": 0, + "upspeed": 0 + } +] \ No newline at end of file diff --git a/dummy-data/qBittorrent/api/v2/transfer/info b/dummy-data/qBittorrent/api/v2/transfer/info new file mode 100644 index 0000000..dd7b318 --- /dev/null +++ b/dummy-data/qBittorrent/api/v2/transfer/info @@ -0,0 +1,10 @@ +{ + "connection_status": "connected", + "dht_nodes": 318, + "dl_info_data": 23481469329, + "dl_info_speed": 1234567, + "dl_rate_limit": 40960000, + "up_info_data": 1788370216, + "up_info_speed": 765432, + "up_rate_limit": 10547200 +} \ No newline at end of file -- cgit v1.2.3