Closed gideontong closed 4 years ago
I will build on what you have in a branch from data
and merge to data
when ready. We can secondarily merge to master
afterwards.
@gideontong sounds good
Current format of json to be pushed to f/e Let me know what images we should have or if we just want the one image. I left the nested images of leaves, flowers, habit etc in just in case
{
"id":158178.0,
"common_name":"Sweetgale",
"scientific_name":"Myrica gale",
"image_url":"https:\/\/bs.floristic.org\/image\/o\/c074f4b51a3cbc0a511176b9b5eb272ce727ca5a",
"vegetable":false,
"edible_part":null,
"edible":false,
"images":{
"flower":[
{
"id":3553507,
"image_url":"https:\/\/bs.floristic.org\/image\/o\/ae1a115a578dd57f127673f46fd96b6e61ede125",
"copyright":"Taken Dec 8, 2016 by EOL \u2212 Encyclopedia of Life (cc-by-nc)"
},
{
"id":3553506,
"image_url":"https:\/\/bs.floristic.org\/image\/o\/c506217b0f7ea8f5565805f6ee250391af399455",
"copyright":"Taken Jul 1, 2020 by Ianto Thomas (cc-by-sa)"
},
{
"id":3553505,
"image_url":"https:\/\/bs.floristic.org\/image\/o\/3ba7e2a24ad00800bbd3b3e5ec68a2c022772566",
"copyright":"Taken Dec 8, 2016 by EOL \u2212 Howard, R.A. (cc-by-nc-sa)"
},
{
"id":3440964,
"image_url":"https:\/\/bs.floristic.org\/image\/o\/d2b208b41abddd17d180c957ce665a0780c2c05e",
"copyright":"Taken Sep 18, 2019 by Charles Buddendorf (cc-by-sa)"
},
{
"id":3440963,
"image_url":"https:\/\/bs.floristic.org\/image\/o\/b95c32baba699167276b9b3a948b2a7d073657cc",
"copyright":"Taken Mar 23, 2020 by David Tremblay (cc-by-sa)"
},
{
"id":3440962,
"image_url":"https:\/\/bs.floristic.org\/image\/o\/84894d2e56edf3bb80caca8f525f3f6417f3eae8",
"copyright":"Taken Apr 2, 2020 by jabets (cc-by-sa)"
},
{
"id":3440961,
"image_url":"https:\/\/bs.floristic.org\/image\/o\/7d907c70d7bfbc6f88981edd6d06568ec834f80a",
"copyright":"Taken Apr 21, 2019 by kjellivars (cc-by-sa)"
},
{
"id":3440960,
"image_url":"https:\/\/bs.floristic.org\/image\/o\/14ce61a37c79fb2df510ad1addd59712f8d62457",
"copyright":"Taken Dec 8, 2016 by EOL \u2212 Hajotthu (cc-by)"
}
],
"leaf":[
{
"id":3553501,
"image_url":"https:\/\/bs.floristic.org\/image\/o\/d8e358036af597f1bc74b6291bac46dea70f9ebd",
"copyright":"Taken Jul 13, 2020 by Lopez Paco (cc-by-sa)"
},
{
"id":3440954,
"image_url":"https:\/\/bs.floristic.org\/image\/o\/0d6eb64af2d367816c2a51be2c1ba58f0a106242",
"copyright":"Taken Jun 8, 2020 by Eldsyn (cc-by-sa)"
},
{
"id":3440953,
"image_url":"https:\/\/bs.floristic.org\/image\/o\/2f335d0e19ae3db9f5c888a9b1a611b6186d7f17",
"copyright":"Taken Jul 11, 2019 by Claudia R\u00fchmkorf (cc-by-sa)"
},
{
"id":3440952,
"image_url":"https:\/\/bs.floristic.org\/image\/o\/7bcf4c0993ba9606546cdf6f498b63e47a5f40e6",
"copyright":"Taken Sep 18, 2019 by Charles Buddendorf (cc-by-sa)"
},
{
"id":3440951,
"image_url":"https:\/\/bs.floristic.org\/image\/o\/f95345a8eb5f373e2d38a0ac3be98e0540bed426",
"copyright":"Taken Jul 14, 2019 by jangleress (cc-by-sa)"
},
{
"id":3440950,
"image_url":"https:\/\/bs.floristic.org\/image\/o\/76310906a5493ae344d86dcfaab570ea8cad9716",
"copyright":"Taken Jun 29, 2019 by Westberg Annika (cc-by-sa)"
}
],
"habit":[
{
"id":3553504,
"image_url":"https:\/\/bs.floristic.org\/image\/o\/32ff021abc847ab5a54982c9c8f15af1140410ca",
"copyright":"Taken Dec 8, 2016 by EOL \u2212 P. Gourdain (cc-by-nc-sa)"
},
{
"id":3553503,
"image_url":"https:\/\/bs.floristic.org\/image\/o\/52e9e851f61eb19be411c7f8d500df8025999ada",
"copyright":"Taken Dec 8, 2016 by EOL \u2212 Mike Leveille (cc-by-nc)"
},
{
"id":3553502,
"image_url":"https:\/\/bs.floristic.org\/image\/o\/767069866411828ba544e5df3151679ec9993349",
"copyright":"Taken Dec 8, 2016 by EOL \u2212 roy pilcher (cc-by-nc)"
},
{
"id":3440959,
"image_url":"https:\/\/bs.floristic.org\/image\/o\/c074f4b51a3cbc0a511176b9b5eb272ce727ca5a",
"copyright":"Taken Jun 8, 2020 by Eldsyn (cc-by-sa)"
},
{
"id":3440958,
"image_url":"https:\/\/bs.floristic.org\/image\/o\/75263493f9ad197f73f3267fede90ce501637206",
"copyright":"Taken Jul 22, 2016 by Tela Botanica \u2212 Genevieve BOTTI (cc-by-sa)"
},
{
"id":3440957,
"image_url":"https:\/\/bs.floristic.org\/image\/o\/9c7d9de3e922080459e600e8d01d343234db1997",
"copyright":"Taken Dec 8, 2016 by EOL \u2212 Sara (cc-by-nc)"
},
{
"id":3440956,
"image_url":"https:\/\/bs.floristic.org\/image\/o\/30182013a8018c1477ef65e4f878c02be4da8162",
"copyright":"Taken Dec 8, 2016 by EOL \u2212 Encyclopedia of Life (cc-by-nc)"
},
{
"id":3440955,
"image_url":"https:\/\/bs.floristic.org\/image\/o\/9a58cbae7f87d11d1d67beb4854f8fd5ee8d873b",
"copyright":"Taken Dec 8, 2016 by EOL \u2212 Stensvold, Mary Clay (cc-by-nc-sa)"
}
],
"fruit":[
{
"id":3553508,
"image_url":"https:\/\/bs.floristic.org\/image\/o\/c87c92b344034122e0cd1412097c187db0cb0988",
"copyright":"Taken Dec 8, 2016 by EOL \u2212 Encyclopedia of Life (cc-by-nc)"
},
{
"id":3440970,
"image_url":"https:\/\/bs.floristic.org\/image\/o\/a033674f8da57c2eb086bfdd897d353ce5aae0ae",
"copyright":"Taken Dec 8, 2016 by EOL \u2212 Howard, R.A. (cc-by-nc-sa)"
},
{
"id":3440969,
"image_url":"https:\/\/bs.floristic.org\/image\/o\/cf0c44bce4fdaa6abe2009df8794bf3a527bd327",
"copyright":"Taken Dec 8, 2016 by EOL \u2212 Encyclopedia of Life (cc-by-sa)"
},
{
"id":3440968,
"image_url":"https:\/\/bs.floristic.org\/image\/o\/332f185476604d408f526a0d44b622846ce09dd5",
"copyright":"Taken Dec 8, 2016 by EOL \u2212 Encyclopedia of Life (cc-by-nc-sa)"
},
{
"id":3440967,
"image_url":"https:\/\/bs.floristic.org\/image\/o\/36ce87fabca0b3973bff7e32b2ba3f529b6c9249",
"copyright":"Taken Apr 10, 2014 by Photoflora \u2212 Jean-Luc TASSET (\u00a9)"
},
{
"id":3440965,
"image_url":"https:\/\/bs.floristic.org\/image\/o\/e2475121d44a1b3acbfdde7362e25a4dbe1832a7",
"copyright":"Taken Dec 8, 2016 by EOL \u2212 Sten Porse (cc-by-sa)"
}
],
"bark":[
{
"id":3440973,
"image_url":"https:\/\/bs.floristic.org\/image\/o\/3e2076123e5bc44f7c11eefde7291b79d667ada9",
"copyright":"Taken Sep 25, 2017 by R\u00e9mi Knaff (cc-by-sa)"
},
{
"id":3440972,
"image_url":"https:\/\/bs.floristic.org\/image\/o\/9afdc3b9034152aa300c9ff250a80dc85fb1fe60",
"copyright":"Taken May 23, 2019 by Karl-Heinz Riedinger (cc-by-sa)"
},
{
"id":3440971,
"image_url":"https:\/\/bs.floristic.org\/image\/o\/6491de34d0edcca3d4414ddb76f75dfb68b0b776",
"copyright":"Taken Jun 7, 2019 by J E (cc-by-sa)"
}
],
"other":[
{
"id":3553510,
"image_url":"https:\/\/bs.floristic.org\/image\/o\/9c42090bda5d86e7d7ed673719194f2b200e1b34",
"copyright":"Taken Dec 30, 2011 by Tela Botanica \u2212 Patricia DESTRADE (cc-by-sa)"
},
{
"id":3553509,
"image_url":"https:\/\/bs.floristic.org\/image\/o\/5a414705b63e5ee7d4bfa7d47267bd5bb3285f42",
"copyright":"Taken Dec 8, 2016 by EOL \u2212 Encyclopedia of Life (cc-by-nc-sa)"
},
{
"id":3440978,
"image_url":"https:\/\/bs.floristic.org\/image\/o\/d77348008653969ba4fe5b1f4410d0b4f8ca3e72",
"copyright":"Taken Nov 19, 2014 by Tela Botanica \u2212 Thibault LANGLOIS (cc-by-sa)"
},
{
"id":3440977,
"image_url":"https:\/\/bs.floristic.org\/image\/o\/d7b22dbb7f27d02b65d5f95e41972530ed401077",
"copyright":"Taken Jun 9, 2013 by Tela Botanica \u2212 Liliane Roubaudi (cc-by-sa)"
},
{
"id":3440976,
"image_url":"https:\/\/bs.floristic.org\/image\/o\/7fdab98d15450c872c291af9c2755f8469cd57e1",
"copyright":"Taken Oct 4, 2011 by Tela Botanica \u2212 Daniel MATHIEU (cc-by-sa)"
},
{
"id":3440975,
"image_url":"https:\/\/bs.floristic.org\/image\/o\/1a64ea24729b7a531b9dd516474ab1ee0bf6d27e",
"copyright":"Taken Dec 8, 2016 by EOL \u2212 Encyclopedia of Life (cc-by-nc-sa)"
},
{
"id":3440974,
"image_url":"https:\/\/bs.floristic.org\/image\/o\/449403ccb417911f5db7150710a14cc442f31eed",
"copyright":"Taken Jan 3, 2014 by Tela Botanica \u2212 Ga\u00ebl GICQUIAUD (cc-by-sa)"
}
]
},
"flower_color":[
"yellow"
],
"foliage_color":[
"green"
],
"fruit_or_seed_color":[
"blue"
],
"toxicity":"none"
}
Clarification: This is what a single plant row would look like
Small thing, can you send me the toxicity level as a number from 0 (none) to 3 (high). If not it's no biggie, I just hate strings :^)
Small thing, can you send me the toxicity level as a number from 0 (none) to 3 (high). If not it's no biggie, I just hate strings :^)
I can update that tonight if it's not updated before then.
Okay, will update such that toxicity is a number, and also a new field added called results
which is the number of total results (as it doesn't make sense to return all the results as a huge JSON object, we only want to show the user 3-5 anyways, but we will cache all of them).
Complete! Pinging the API with the format /plant?search=
and then some text will return a plant.
currently working on in data branch.