1.7 KiB
1.7 KiB
Basic Episodes Fetch
Overview
This plan focuses on adding a minimal episodes‑fetch feature that pulls podcast episodes from the CommaFeed backend using environment variables for configuration.
The plan is derived from:
docs/dev/README.md(API endpoints, authentication)src/structure and existing route system- Build scripts in
bs/– only linting is required at this stage.
Tasks
- API client (DONE)
- Adds
src/apifolder to the project structure (update also @src/README.md). - Implement a lightweight wrapper around
fetchinsrc/api/fetchAPI.ts. - Build
authHeader()that returns the Basic‑Auth header using for now hardcoded vars.
- Adds
- Episode service (DONE)
- Add
src/api/episodes.tswithgetEpisodes(feedId)andgetEpisode(id). - Add data types
- Use
/rest/feed/entries?feed_id=${feedId}endpoint.
- Add
- Page update (TODO)
- Add fetching all episodes
- Update
<app-episodes>to reflect loading state(s). - Add episode list item component.
- Update
<app-episodes>to render the episode list received from the route context.
- Testing (TODO)
- Add unit tests for
api/*.tsusing project test setup. - Add unit test for created component(s)
- Add unit tests for
- Linting (TODO)
- Ensure all new files satisfy the lint rule defined in
bs/dev/lint.
- Ensure all new files satisfy the lint rule defined in
Expected Output
- Visiting
/episodes/will display a list of episodes fetched from CommaFeed. - Episodes are identified by their
idand displayed with title, publish date, and an audio link if available. - Authentication uses the env variables; no credentials are hard‑coded in source.
Note
: This plan intentionally keeps external dependencies minimal. It can be extended later for pagination, caching, or offline support.