Closed danbergeron3 closed 9 months ago
Was able to limit amount of entries we pull from db, still working to get perennial data parsed and into our db.
What's the issue here. i checked out the api page https://perenual.com/docs/api so you wanted to store api data into the database right?
@loki4514 who are u?
well the issue is public and it's visible to everyone so i thought i could work on that, more like open source contribution/ contribute to small project.
@loki4514 I appreciate your interest! I will speak with my other teammates tomorrow and get back to you. Sorry for popping the question like that lol
Yes we wanted to bring some of the data into are database, the problem was you the data we need is split across 2 collections and we only have 100 API calls. Figured out the problem just needed to pull from a different collection in the API. I was pulling from species and species details, I should have been pulling from species and plants guide. Doing the former exhausted my 100 free API calls. @loki4514
@danbergeron3 in one api call how many number of documents(no of records) can you retrive
@loki4514 requests to Species
returns 30 documents for one call, which is enough for our purposes. Species
documents do not contain a plant description which is a problem. So I tried using Species Details
to get the description. Species Details
only returns one document based of the ID. This is forcing me to make 30 API calls to match descriptions with plants. I will implement your two points in my next commit.
Also I created an object to store the data matched with its description then I was going to store that.
Was able to implement InsertMany
to add db entries. Added page element to schema to allow us to keep track of where data came from.
General Description
We will use the plant api to help fill our db when it runs out of documents to give to the frontend. Issue perennial only allows 100 calls a day. We can get 30 plants from one call, but to get descriptions we have to do a call for each plant.
Proposed Solution
<enter here>
Checklist