treflehq / trefle-api

🍀 Trefle is a botanical JSON REST API for plants species, allowing you to search and query over all the registered species, and build the next gardening apps and farming robots.
https://trefle.io
GNU Affero General Public License v3.0
488 stars 51 forks source link

species request causing data array to be empty #82

Closed nitinR9 closed 3 years ago

nitinR9 commented 3 years ago

Describe the bug When requesting API for 'ficus-microcarpa' through URL 'https://trefle.io/api/v1/species/search?token=ACCESS_TOKEN&q=Ficus microcarpa' data array is returning empty data array. Does the data for this species not exists?

To Reproduce Steps to reproduce the behavior(using nodejs): const fetch = require('node-fetch') ; require('dotenv').config() ; const access_token = process.env.ACCESS_TOKEN ; async function request(){ const dataObj = await fetch(https://trefle.io/api/v1/species/search?token=${access_token}&q=ficus microcarpa`)

const json = await dataObj.json() ;
return json

}

request().then( (json) => { console.log(json) })`

Expected behavior The result must be there as its records are present over other websites.

lambda2 commented 3 years ago

Hello @splintercell9dev. This species were missing, so it has been added properly.

nitinR9 commented 3 years ago

@lambda2 Now this species is fixed. Now another species that was working perfectly before i.e bauhinia-blakeana is now giving error on request { "error": true, "message": "can't find record: \"bauhinia-blakeana\"" }

lambda2 commented 3 years ago

Hey, indeed some changes has been made to this species, that is in fact an artificial hybrid. The slug is now bauhinia-x-blakeana