Class ApiService


  • @Service
    public class ApiService
    extends Object
    Controller handling Bitchute API
    Since:
    1.0
    Version:
    1.0
    Author:
    Karafra
    See Also:
    Bitchute
    • Constructor Detail

      • ApiService

        public ApiService()
    • Method Detail

      • getTarget

        public ParsedLinkResponse getTarget​(String link)
        Extracts link to bitchute video from link.
        Parameters:
        link - link to extract raw video form.
        Returns:
        response containing both original and raw link.
        Since:
        1.0
      • getTargetFromId

        public ParsedLinkResponse getTargetFromId​(String id)
        Parses link to bitchute video from id of video.
        Parameters:
        id - of video to extract raw link from.
        Returns:
        response containing both original and raw link.
        Since:
        1.0
      • viewVideoById

        public org.springframework.web.servlet.ModelAndView viewVideoById​(String id)
        Logic for viewing videos on this website.
        Parameters:
        id - id of video.
        Returns:
        view and model of website for viewing videos,
        Since:
        1.0
      • downloadVideo

        public org.springframework.http.ResponseEntity<org.springframework.core.io.Resource> downloadVideo​(String id)
        Logic for downloading videos.
        Parameters:
        id - identifier of video.
        Returns:
        downloadable resource.
        Since:
        1.0
      • downloadVideo

        public org.springframework.http.ResponseEntity<org.springframework.core.io.Resource> downloadVideo​(DownloadVideoRequest req)
        Logic for downloading video from link.
        Parameters:
        req - request containing url to download from.
        Returns:
        downloadable resource.
        Since:
        1.0