-
Notifications
You must be signed in to change notification settings - Fork 0
/
responses.js
132 lines (105 loc) · 7.12 KB
/
responses.js
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
var exports = module.exports = {};
var responses = [];
responses.push({ "images": [
{ "plantNames":"passion flowers (passiflora alata)",
"id":"296686c8-b211-11e3-b2ad-2c44fd8111a4",
"title":"Passiflora alata", "imageUrl":"http://img9.justvisual.com/250/296686c8-b211-11e3-b2ad-2c44fd8111a4.jpg",
"pageUrl":"http://es.wikipedia.org/wiki/Passiflora_alata"},
{ "plantNames": "passion flowers (passiflora alata)",
"id":"a44b901e-6412-11e4-96e9-d89d67172f14",
"title":"Passiflora alata",
"imageUrl":"http://img9.justvisual.com/250/a44b901e-6412-11e4-96e9-d89d67172f14.jpg",
"pageUrl":"http://es.wikipedia.org/wiki/Passiflora_alata" },
{ "plantNames":"passion flowers (passiflora alata)",
"id":"a43f138e-6412-11e4-a8e2-d89d67172f14",
"title":"Passiflora alata",
"imageUrl":"http://img9.justvisual.com/250/a43f138e-6412-11e4-a8e2-d89d67172f14.jpg",
"pageUrl":"http://es.wikipedia.org/wiki/Passiflora_alata" },
{ "plantNames":"passion flowers (passiflora alata)",
"id":"c76eb72c-963d-11e3-8cab-6c3be5a620fc",
"title":"Flower Detail",
"imageUrl":"http://img10.justvisual.com/250/124229181.jpg",
"pageUrl":"http://es.wikipedia.org/wiki/Passiflora_alata",
"description":"Passion flower (Passiflora; syn. Disemma Labill.) is a genus of about 500 species of flowering plants in the family Passifloraceae. They are mostly vines, with some being shrubs, and a few species being herbaceous. For information about the fruit of the passiflora plant, see passionfruit.\n\nWikipedia.com" },
], "searchId":"b02a41c0-2674-11e6-9d28-a0d3c1ef5bb4" });
responses.push({ "images": [
{ "plantNames": "dahlias (dahlia)",
"id": "78a21452-a425-11e3-a0e6-2c44fd8111a4",
"title": "Dahlia",
"imageUrl": "http://img2.justvisual.com/250/78a21452-a425-11e3-a0e6-2c44fd8111a4.jpg",
"pageUrl": "http://es.wikipedia.org/wiki/Dahlia" },
{ "plantNames": "dahlias (dahlia)", "id":"7c05ade3-ba6f-11e3-89e2-2c44fd8111a4",
"title": "Yellow Dahlia", "imageUrl":"http://img7.justvisual.com/250/7c05ade3-ba6f-11e3-89e2-2c44fd8111a4.jpg",
"pageUrl": "http://es.wikipedia.org/wiki/Dahlia" },
{ "plantNames": "dahlias (dahlia)",
"id":"68c94f34-9620-11e3-8cab-6c3be5a620fc",
"title":"Dahlia",
"imageUrl":"http://img9.justvisual.com/250/52001056.jpg",
"pageUrl":"http://es.wikipedia.org/wiki/Dahlia",
"description":"This is really my favourite." },
{ "plantNames": "dahlias (dahlia)","id":"3e8a2673-b463-11e3-b0b5-2c44fd8111a4",
"title": "Dahlia",
"imageUrl": "http://img5.justvisual.com/250/3e8a2673-b463-11e3-b0b5-2c44fd8111a4.jpg",
"pageUrl":"http://es.wikipedia.org/wiki/Dahlia" },
{ "plantNames": "dahlias (dahlia)",
"id":"d762eab9-a544-11e3-a39d-2c44fd8111a4",
"title":"Yellow Dahlia",
"imageUrl":"http://img9.justvisual.com/250/d762eab9-a544-11e3-a39d-2c44fd8111a4.jpg",
"pageUrl":"http://es.wikipedia.org/wiki/Dahlia",
"description":"©Kim Wall – All Rights Reserved\nCotswold Wildlife Park" },
{ "plantNames":"dahlias (dahlia)",
"id": "4fcb9c90-b464-11e3-8393-2c44fd8111a4",
"title": "Dahlia",
"imageUrl": "http://img1.justvisual.com/250/4fcb9c90-b464-11e3-8393-2c44fd8111a4.jpg",
"pageUrl": "http://es.wikipedia.org/wiki/Dahlia" },
{ "plantNames": "dahlias (dahlia)",
"id": "d8f42c46-b18e-11e3-b2ad-2c44fd8111a4",
"title": "love those yellow flowers 2009",
"imageUrl": "http://img2.justvisual.com/250/d8f42c46-b18e-11e3-b2ad-2c44fd8111a4.jpg",
"pageUrl": "http://es.wikipedia.org/wiki/Dahlia",
"description": "so pretty. john hoellerich photo(fotogjohnh)." },
{ "plantNames": "dahlias (dahlia)",
"id":"8ca6640d-b17d-11e3-ba60-2c44fd8111a4",
"title":"Dahliengarten - 030",
"imageUrl":"http://img7.justvisual.com/250/8ca6640d-b17d-11e3-ba60-2c44fd8111a4.jpg",
"pageUrl":"http://es.wikipedia.org/wiki/Dahlia" }
], "searchId":"b3141810-2670-11e6-9d28-a0d3c1ef5bb4" });
responses.push({"images": [
{ "plantNames":"gazanias (gazania)",
"id":"34329c29-9632-11e3-8cab-6c3be5a620fc",
"title":"gazania",
"imageUrl":"http://img6.justvisual.com/250/34329c29-9632-11e3-8cab-6c3be5a620fc.jpg",
"pageUrl":"http://es.wikipedia.org/wiki/Gazania" },
{ "plantNames":"gazanias (gazania)",
"id":"18a5aa91-9635-11e3-8cab-6c3be5a620fc",
"title":"In my street",
"imageUrl":"http://img7.justvisual.com/250/18a5aa91-9635-11e3-8cab-6c3be5a620fc.jpg",
"pageUrl":"http://es.wikipedia.org/wiki/Gazania",
"description":"Gazanias" },
{ "plantNames":"gazanias (gazania)",
"id":"d8d1edad-963b-11e3-8cab-6c3be5a620fc",
"title":"Gazania",
"imageUrl":"http://img10.justvisual.com/250/119492502.jpg",
"pageUrl":"http://es.wikipedia.org/wiki/Gazania" },
{ "plantNames":"gazanias (gazania)",
"id":"9697713d-ba89-11e3-89e2-2c44fd8111a4",
"title":"IMG_0272",
"imageUrl":"http://img8.justvisual.com/250/9697713d-ba89-11e3-89e2-2c44fd8111a4.jpg",
"pageUrl":"http://es.wikipedia.org/wiki/Gazania",
"description":"Gazania \u0027Daybreak Pink Shades\u0027" },
{ "plantNames":"dahlias (dahlia)",
"id":"93e9ef5d-9687-11e3-8cab-6c3be5a620fc",
"title":"DAHLIA",
"imageUrl":"http://img1.justvisual.com/250/306129587.jpg",
"pageUrl":"http://es.wikipedia.org/wiki/Dahlia",
"description":"DAHLIA is a bushy, perennial plant. The plant is sometimes referred to as the - valley flower. They are commonly grown as garden plants. (Wiki)" }
],"searchId":"ab62b980-2672-11e6-9d28-a0d3c1ef5bb4"});
exports.random = function() {
var min = 0;
var count = responses.length
// http://stackoverflow.com/questions/4959975/generate-random-value-between-two-numbers-in-javascript;
var rnd = Math.floor(Math.random() * count) + min;
var data = responses[rnd];
data.ix = rnd;
return data;
}