Class ApiController


  • @RestController
    @RequestMapping("/bitchute")
    public class ApiController
    extends Object
    Controller handling Bitchute downloads
    Since:
    1.0
    Version:
    1.0
    Author:
    Karafra
    See Also:
    Bitchute
    • Constructor Detail

      • ApiController

        public ApiController()
    • Method Detail

      • parseVideo

        @GetMapping("/{video}/parse")
        public ParsedLinkResponse parseVideo​(@PathVariable("video")
                                             String id)
        Endpoint used for parsing videos from bitchute.
        Parameters:
        id - link to video,
        Returns:
        response containing both original and raw link.
        Since:
        1.0
      • parseVideo

        @PostMapping("/parse")
        public ParsedLinkResponse parseVideo​(@RequestParam
                                             ParseLinkRequest parseLinkRequest)
        Parses link to raw video from bitchute link.
        Parameters:
        parseLinkRequest - request.
        Returns:
        response containing both original and raw link
        Since:
        1.0
      • viewVideo

        @GetMapping("{video}/view")
        public org.springframework.web.servlet.ModelAndView viewVideo​(@PathVariable("video")
                                                                      String id)
        Endpoint used for viewing videos on bitchute on this website.
        Parameters:
        id - identifier of video on bitchute.
        Returns:
        rendered video template.
        Since:
        1.0
      • downloadFile

        @GetMapping("{video}/download")
        public org.springframework.http.ResponseEntity<org.springframework.core.io.Resource> downloadFile​(@PathVariable("video")
                                                                                                          String id)
        Endpoint used for downloading videos from bitchute.
        Parameters:
        id - id of video on bitchute.
        Returns:
        downloadable stream.
        Since:
        1.0
      • downloadFile

        @PostMapping("/download")
        public org.springframework.http.ResponseEntity<org.springframework.core.io.Resource> downloadFile​(@RequestParam
                                                                                                          DownloadVideoRequest req)
        Downloads video from request.
        Parameters:
        req - request containing link to download video from.
        Returns:
        downloadable resource
        Since:
        1.0