Oliver Eyton-Williams ee1e8abd87
feat(curriculum): restore seed + solution to Chinese (#40683)
* feat(tools): add seed/solution restore script

* chore(curriculum): remove empty sections' markers

* chore(curriculum): add seed + solution to Chinese

* chore: remove old formatter

* fix: update getChallenges

parse translated challenges separately, without reference to the source

* chore(curriculum): add dashedName to English

* chore(curriculum): add dashedName to Chinese

* refactor: remove unused challenge property 'name'

* fix: relax dashedName requirement

* fix: stray tag

Remove stray `pre` tag from challenge file.

Signed-off-by: nhcarrigan <nhcarrigan@gmail.com>

Co-authored-by: nhcarrigan <nhcarrigan@gmail.com>
2021-01-12 19:31:00 -07:00

18 lines
2.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
id: bd7158d8c442eddfaeb5bd1f
title: 使用Twitch JSON API
challengeType: 3
videoUrl: ''
dashedName: use-the-twitch-json-api
---
# --description--
**目标:** 构建一个功能类似于此的[CodePen.io](https://codepen.io)应用程序: [https](https://codepen.io/freeCodeCamp/full/Myvqmo/) **** [//codepen.io/freeCodeCamp/full/Myvqmo/](https://codepen.io) 。完成以下[用户故事](https://en.wikipedia.org/wiki/User_story) 。使用您需要的任何库或API。给它你自己的个人风格。 **用户故事:** 我可以看到freeCodeCamp当前是否在Twitch.tv上流式传输。 **用户故事:** 我可以点击状态输出并直接发送到freeCodeCamp的Twitch.tv频道。 **用户故事:** 如果Twitch用户当前正在播放我可以看到有关他们正在播放的内容的其他详细信息。 **提示:** 请参阅[http://forum.freecodecamp.org/t/use-the-twitchtv-json-api/19541上](http://forum.freecodecamp.org/t/use-the-twitchtv-json-api/19541)对Twitch.tv的JSONP API的示例调用。 **提示:** 有关此API调用的相关文档位于 [https](https://dev.twitch.tv/docs/v5/reference/streams/#get-stream-by-user) [//dev.twitch.tv/docs/v5/reference/streams/#get-stream-by-user](https://dev.twitch.tv/docs/v5/reference/streams/#get-stream-by-user) 。 **提示:** 这是定期传输的人的Twitch.tv用户名数组 `["ESL_SC2", "OgamingSC2", "cretetion", "freecodecamp", "storbeck", "habathcx", "RobotCaleb", "noobs2ninjas"]` **更新:** 由于[此处](https://blog.twitch.tv/client-id-required-for-kraken-api-calls-afbb8e95f843#.f8hipkht1)解释的API使用条件发生变化Twitch.tv现在需要API密钥但我们已经构建了一种解决方法。使用[https://wind-bow.glitch.me/twitch-api](https://wind-bow.glitch.me)而不是twitch的API基本URL`https://api.twitch.tv/kraken您仍然可以获取帐户信息而无需注册API密钥。如果卡住请记得使用`[Read-Search-Ask](https://forum.freecodecamp.org/t/how-to-get-help-when-you-are-stuck-coding/19514) 。完成后单击“我已完成此挑战”按钮并包含指向CodePen的链接。您可以通过Facebook上的朋友分享您的项目反馈。
# --solutions--
```js
// solution required
```