blob: 6859aa698c67e6e755cfa0d226806819216107d4 [file] [log] [blame]
package api;
import org.springframework.core.io.Resource;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
@RestController
@RequestMapping("/api")
public interface ApiInterface {
@PostMapping("/save-torrent")
ResponseEntity<Integer> saveTorrent(
@RequestParam("userid") String userid,
@RequestParam("title") String title,
@RequestParam("tag") String tag,
@RequestParam("file") MultipartFile file
);
@GetMapping("/get-torrent")
ResponseEntity<Resource> getTorrent(
@RequestParam("torrentId") String seedid,
@RequestParam("userId") String userid
);
@GetMapping("/get-seed-list-by-tag")
ResponseEntity<String> getSeedListByTag(
@RequestParam("tag") String tag
);
@GetMapping("/torrent-detail")
ResponseEntity<String> getTorrentDetail(
@RequestParam("id") String seedid
);
}