CodeYourFuture / CodeYourFuture/Module-Data-Flows

TV Show Project Level 300: Swap back to your old codebase

未关闭
#477 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
🏕 Priority Mandatory 📅 Sprint 2 Core Submit:None
主要语言
JavaScript
星标
0
派生
275
PR 合并指标
30 天内没有已合并 PR

描述

# Level 300

For level 300, you should switch back to your original codebase.

You should have reviewed and merged your partner's level 200 changes through a PR to your own repo.

Remember to pull the latest changes onto your local machine.

Once again, compare their implementation to yours. Think:
1. How is it different?
2. What do you prefer about your implementation?
3. What do you prefer about their implementation?
4. What did you learn that you didn't know before?

Have a discussion about your answers to these questions. In class, together, give a 3 minute talk about your conclusions.

## Refactoring

Like with level 200, feel free to change anything in your codebase which you think will make it easier to work with, or to build new features.

Make a branch and pull request for yourself, and then have your partner review, making sure they understand the changes made.

## Adding new functionality

Level 300 is about getting rid of our static data from `episodes.js`, and instead using an API.

### Requirements

1. You must delete the `episodes.js` file from your repository.
2. Your website must still work the same, but by using a `fetch` request to https://api.tvmaze.com/shows/82/episodes. This URL should serve the exact same content as was returned by `getAllEpisodes` in `episodes.js`.
3. You must fetch this URL only _once_ per visit to your website. You should not re-fetch when someone searches, scrolls, or selects an episode from the drop-down.
4. If you don't have data yet, you should show something to tell the user to wait for the data.
5. If an error occurred loading the data, notify the user.
1. Note: real users don't look in the console - `console.log` or `console.error` are not sufficient for this requirement.
2. You will need to simulate an error to test this out yourself.

### Documentation

You can see that this endpoint has been documented here: https://www.tvmaze.com/api#show-episode-list

贡献指南

这个仓库没有索引到贡献指南

调研方向

从 episodes.js 和现有的 getAllEpisodes 流程开始,然后检查网站如何使用剧集数据进行搜索、滚动和选择。阅读 TVMaze 剧集列表 API 文档,并测试加载状态和模拟错误状态。完成的标准是移除 episodes.js、每次访问只获取一次 URL,并让用户在等待或发生错误时看到明确的反馈。

由索引模型根据 Issue 内容生成。

评估

技术栈
javascript
领域
api, frontend
Issue 类型
功能
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。