OwnTube-tv / web-client

Portable video client for PeerTube in React Native
https://owntube-tv.github.io/web-client/
The Unlicense
3 stars 12 forks source link

Extend the VideoService to support using live API data #37

Closed ar9708 closed 4 months ago

ar9708 commented 5 months ago

Now we have an initial VideoService from #10 implemented and merged in #19 (still only using local test data), and we have a PeertubeVideosApi service on the way in via PR #33. I would like Someone to update the VideoService as follows:

  1. The VideoService constructor should be updated to either a) read data from the local testData.json file, or b) read live data from the API of a PeerTube instance using the PeerTubeVideosApi service
  2. Update tests in lib/videoService.test.ts to cover two basic scenarios:
    1. Expected behavior when VideoService is initialized to use test data (as it is now, the baseline)
    2. Expected behavior when VideoService is initialized with a PeerTube instance "peertube2.cpy.re" as backend (returns a list of all videos)

Run through GitHub Actions CI/CD pipeline on your fork, ensure that the solution can be verified to work both with local test data and the live API data (manual tests on GitHub Pages deployment), and attend to the Devoplement / Contributing checklist in the project README before submitting a solution for review.

ar9708 commented 4 months ago

Resolved in #62