Files
freeCodeCamp/curriculum/challenges/chinese/09-information-security/information-security-projects/stock-price-checker.md
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

2.0 KiB
Raw Blame History

id, title, challengeType, videoUrl, dashedName
id title challengeType videoUrl dashedName
587d824a367417b2b2512c44 股票价格检查 4 stock-price-checker

--description--

构建一个功能类似于此的完整堆栈JavaScript应用程序 https //giant-chronometer.glitch.me/ 。在这个项目上工作将涉及您在我们的入门项目上在Glitch上编写代码。完成此项目后您可以将公共故障网址到应用程序的主页复制到此屏幕进行测试您可以选择在另一个平台上编写项目但必须公开显示我们的测试。使用此链接在Glitch上启动此项目或在GitHub上克隆此存储库 如果您使用Glitch请记住将项目链接保存到安全的地方

--hints--

将内容安全策略设置为仅允许从服务器加载脚本和css。


我可以使用包含纳斯达克股票代码的表格数据获得/ api /股票价格并收回一个对象stockData。


在stockData中我可以看到股票字符串股票代码价格字符串格式的小数和喜欢int


我也可以传递像trueboolean这样的字段来将我的喜欢添加到股票中。每个IP应该只接受1个。


如果我传递2只股票则返回对象将是一个包含股票信息的数组。而不是喜欢它将显示两者上的rel_likes两只股票之间的差异


获得当前价格的一个好方法是使用以下外部API用您的股票替换“GOOG”https//finance.google.com/finance/infoq = NASDAQ3AOGOOG


所有5个功能测试都已完成并通过。


--solutions--

/**
  Backend challenges don't need solutions, 
  because they would need to be tested against a full working project. 
  Please check our contributing guidelines to learn more.
*/