2018-10-10 18:03:03 -04:00
|
|
|
|
---
|
|
|
|
|
id: bd7158d8c443edefaeb5bdee
|
2020-12-16 00:37:30 -07:00
|
|
|
|
title: 构建图像搜索抽象层
|
2018-10-10 18:03:03 -04:00
|
|
|
|
challengeType: 4
|
|
|
|
|
videoUrl: ''
|
2021-01-13 03:31:00 +01:00
|
|
|
|
dashedName: build-an-image-search-abstraction-layer
|
2018-10-10 18:03:03 -04:00
|
|
|
|
---
|
|
|
|
|
|
2020-12-16 00:37:30 -07:00
|
|
|
|
# --description--
|
2018-10-10 18:03:03 -04:00
|
|
|
|
|
2020-12-16 00:37:30 -07:00
|
|
|
|
**目标:** 构建一个完整的堆栈JavaScript应用程序,允许您搜索如下图像: [https](https://cryptic-ridge-9197.herokuapp.com/api/imagesearch/lolcats%20funny?offset=10) : [//cryptic-ridge-9197.herokuapp.com/api/imagesearch/lolcats%20funny?offset = 10](https://cryptic-ridge-9197.herokuapp.com/api/imagesearch/lolcats%20funny?offset=10)并浏览此类最近的搜索查询: [https](https://cryptic-ridge-9197.herokuapp.com/api/latest/imagesearch/) : [//cryptic-ridge-9197.herokuapp.com/api/latest/imagesearch/](https://cryptic-ridge-9197.herokuapp.com/api/latest/imagesearch/) 。然后将其部署到Glitch。请注意,对于每个项目,您应该创建一个新的GitHub存储库和一个新的Glitch项目。如果您不记得如何执行此操作,请重新访问[https://freecodecamp.org/challenges/get-set-for-our-api-development-projects](/challenges/get-set-for-our-api-development-projects) 。以下是您应该为此项目实现的特定用户故事: **用户故事:** 我可以获取与给定搜索字符串相关的一组图像的图像URL,替代文本和页面URL。 **用户故事:** 我可以通过在URL中添加?offset = 2参数来对响应进行分页。 **用户故事:** 我可以获得最近提交的搜索字符串列表。完成这些用户故事的实现后,单击“我已完成此挑战”按钮,然后输入GitHub存储库和在Glitch上运行的实时应用程序的URL。您可以通过Facebook上的朋友分享您的项目反馈。
|
2018-10-10 18:03:03 -04:00
|
|
|
|
|
2020-12-16 00:37:30 -07:00
|
|
|
|
# --solutions--
|
2020-08-13 17:24:35 +02:00
|
|
|
|
|
2021-01-13 03:31:00 +01:00
|
|
|
|
```js
|
|
|
|
|
// solution required
|
|
|
|
|
```
|