Pull an API and build a array in Vue.js with AXIOS and a promise
$10-30 USD
In Progress
Posted over 4 years ago
$10-30 USD
Paid on delivery
I have an API:
[login to view URL]:Medical%20University%20of%20South%20Carolina$fy:2016$&offset=1&limit=50
That only pulls 50 pages at a time. The total number of page is unknown but the return value give the page number and the totalCount":417,"offset":1,"limit":50,"totalPages":9,. The offset will need to be increased each time. In this case there are 9 pages if every page can get 50 until the last page. The end result will be that [login to view URL] has 417 items.
I need good professional code that will pull every page of the API and builds one object and build an Array in Vue.JS using AXIOS. You don't need to build an entire project just some clean function code.
I have the first request of 50 items but I need it to loop and wait and pull as many page as reported.
loadNIH() {
axios({
method: "GET",
url:
"[login to view URL]@musc.edu&db=pubmed&query=orgName:Medical University of South Carolina&offset=0&limit=50"
})
.then(res => {
[login to view URL] = [login to view URL];
})
.catch(function(error) {
[login to view URL](error);
});
},
I want it to call the API- load the array and then call the next API and add to the array until there is no more data to pull. I need it done with an AXIOS Promise so that it is does not lock up the end user with large data pulls.
hello ,i am rohit nagar from rudra-x software solution . i will make your project if you want to know more about me then plese contact me o
warm regards
rohit nagarac