You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constfetchData=async()=>{constresponse=awaitfetch(`https://trefle.io/api/v1/plants?token=T_uA0qXw0b6uLOiVNsXf7Dns8h5iwLr-MYHgD4fidaA&filter[common_name]=wheat`);constjson=awaitresponse.json();returnjson}constfetchedData=fetchData().then((data)=>{console.log(data.data)})```this is the data I get ```[{id: 190066,common_name: 'Wheat',slug: 'triticum-urartu',scientific_name: 'Triticum urartu',year: 1972,bibliography: 'Bot. Zhurn. (Moscow & Leningrad) 57: 176 (1972)',author: 'Thumanjan ex Gandilyan',status: 'accepted',rank: 'species',family_common_name: 'Grass family',genus_id: 134,image_url: 'https://d2seqvvyy3b8p2.cloudfront.net/138572776e13fbd25318bb29988915bf.jpg',synonyms: ['Triticum urartu var. libanicum','Crithodium urartu','Triticum urartu var. pubescentinigrum','Triticum urartu var. pubescentiurartu','Triticum urartu var. turcicum','Triticum urartu var. binarturutriru'],genus: 'Triticum',family: 'Poaceae',links: {self: '/api/v1/species/triticum-urartu',plant: '/api/v1/plants/triticum-urartu',genus: '/api/v1/genus/triticum'}}]```
butinthedocs,theseisallthefields https://docs.trefle.io/docs/advanced/plants-fieldslikewhydoesmydataonlysomefieldsfromtheonementionedinthere
The text was updated successfully, but these errors were encountered:
[Apologies for reposting this; I realised later I was not on my personal account.]
@ayezinzu If I'm understanding your issue correctly, you're getting a filtered list of results (though there is only 1 result for filter[common_name]=wheat), so you're getting the basic "front page" data. To get all the fields described in the docs, you then need to go to that plant's page, either using one of the links:
Hi. I am struggling to pull information about the plants like their minimum temperature. I think this is the data that is missing when making calls to the API.
Hey guys m using the trefle api.
this is my code
The text was updated successfully, but these errors were encountered: