-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
58 lines (54 loc) · 1.28 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Image Search API</title>
</head>
<body>
<h1>Image Search API
<small>Created for <a href="http://freecodecamp.com">Free Code Camp</a></small>
</h1>
<h2>User stories:</h2>
<ol>
<li>I can get the image URLs, alt text and page urls for a set of images relating to a given search string.</li>
<li>I can paginate through the responses by adding a ?offset=2 parameter to the URL.</li>
<li>I can get a list of the most recently submitted search strings.</li>
</ol>
<h2>Usage:</h2>
https://immense-earth-4759.herokuapp.com/api/imagesearch/cats%20funny?offset=2
<h2>Output:</h2>
[
{
url: "http://i.imgur.com/T9hRUXL.png",
snippet: "What happened to just funny shit and cats?",
context: "http://imgur.com/T9hRUXL"
},
{
url: "http://imgur.com/a/LWssZ",
snippet: "Cats are funny",
context: "http://imgur.com/LWssZ"
}
]
<h2>Usage:</h2>
https://immense-earth-4759.herokuapp.com/api/latest/imagesearch/
<h2>Output:</h2>
[
{
_id: "568c85cc5733aa0300221c89",
term: "cats funny",
when: "2016-01-06T03:11:08.419Z"
},
{
_id: "568c85945733aa0300221c88",
term: "cats funny",
when: "2016-01-06T03:10:12.366Z"
},
{
_id: "568c85855733aa0300221c87",
term: "lolcats funny",
when: "2016-01-06T03:09:57.284Z"
},
...
]
</body>
</html>