blob: 6859aa698c67e6e755cfa0d226806819216107d4 [file] [log] [blame]
rootcd436562025-05-08 14:09:19 +00001package api;
2
Raverf79fdb62025-06-03 06:02:49 +00003import org.springframework.core.io.Resource;
4import org.springframework.http.ResponseEntity;
5import org.springframework.web.bind.annotation.GetMapping;
6import org.springframework.web.bind.annotation.PostMapping;
7import org.springframework.web.bind.annotation.RequestMapping;
8import org.springframework.web.bind.annotation.RequestParam;
9import org.springframework.web.bind.annotation.RestController;
10import org.springframework.web.multipart.MultipartFile;
11
12@RestController
13@RequestMapping("/api")
rootcd436562025-05-08 14:09:19 +000014public interface ApiInterface {
Raverf79fdb62025-06-03 06:02:49 +000015
16 @PostMapping("/save-torrent")
17 ResponseEntity<Integer> saveTorrent(
18 @RequestParam("userid") String userid,
19 @RequestParam("title") String title,
20 @RequestParam("tag") String tag,
21 @RequestParam("file") MultipartFile file
22 );
23
24 @GetMapping("/get-torrent")
25 ResponseEntity<Resource> getTorrent(
Raveraae06122025-06-05 08:13:35 +000026 @RequestParam("torrentId") String seedid,
27 @RequestParam("userId") String userid
28 );
29
30 @GetMapping("/get-seed-list-by-tag")
31 ResponseEntity<String> getSeedListByTag(
32 @RequestParam("tag") String tag
33 );
34
35 @GetMapping("/torrent-detail")
36 ResponseEntity<String> getTorrentDetail(
37 @RequestParam("id") String seedid
Raverf79fdb62025-06-03 06:02:49 +000038 );
rootcd436562025-05-08 14:09:19 +000039}