Closed

Javascript API call using async/await

Hello.

I have some code that nearly does what I require - which I have uploaded.

I want to query an API and return the results within my script. The API has two types, both of which I need my script to be able to query.

"realtime" which returns the data straight away

"queue" which returns an reportID, which you then need to query with "get" to get the data

Criteria:

[login to view URL] use async/await not promises

2. Must be able to handle "realtime" and "queue" types of requests

3. For the "queue" type of request, if "report_not_ready" is returned, wait 1 second and try again with the same reportID

4. For queue, give up if after 3 times it fails.

Design:

I want there to be a small main function which I put on my page, which calls out to a large function which does the API call. This small function will not only define the variables which will be sent with the API query (i.e like report type), but will also get the data returned to it, so I can determine what to do with it (simple example, put in an alert box).

I've done a lot of the work in my attached file, but you will see that it doesn't meet the criteria above, so I need your help getting it to work.

The API is secret, so I am afraid you will not be able to test with it, but you will see the code is not that complicated.

Skills: AJAX, Javascript, jQuery / Prototype

See more: mean javascript api aspnet, javascript api aspnet, flash flv player javascript api, javascript quiz using yes, joomla javascript api, cafepress api using affiliate, parse yahoo weather api using php, youtube javascript api player without youtube logo, javascript api called, solid edge api using, driving distance javascript api, viddler javascript api, visitor javascript api, songs search engine api using php, google map javascript api distance calculation, freshbooks api using javascript, calls volusion api using php, using javascript api scribd, ultracart checkout api using javascript

About the Employer:
( 6 reviews ) Sevenoaks, United Kingdom

Project ID: #17929075

19 freelancers are bidding on average £24 for this job

BaNgan

Hi, I can check for solution for you tomorrow as it is late here my time But wanna ask that you did not use async/await yet right, I don't see them in your attached and also we can use $.get and $.post on the project More

£30 GBP in 10 days
(242 Reviews)
7.0
RazaAnis

Hi, It seems like a pretty straight-forward work. I would love to work on this json data fetching from the api for you using asynchronous and await calls. Contact me via chat and we can start this work asap.

£25 GBP in 1 day
(12 Reviews)
5.3
nataliaomelchenk

Hi I understand your idea I have a lot of experience in Ajax If you hire me I'll finish in 1 hour Thanks for your attention

£26 GBP in 10 days
(9 Reviews)
4.7
imdineshbiz

Hello Sir/madam, I’m excited to share with you the proposal for the website . I’m truly excited to be working with you on your project . I look forward to your response. I have 2 years experience of web technology More

£34 GBP in 10 days
(4 Reviews)
3.6
ravi070994

Hey I read your description and with prior experience working with async/await in JS, I would like to work with you in finishing this project

£24 GBP in 2 days
(6 Reviews)
2.7
case1352

this sounds pretty straightforward and shouldnt take long at all. please take a look over my feedback and get in touch if you have any questions. thanks, simon

£13 GBP in 1 day
(4 Reviews)
2.4
wearetogether

this seems normal. we can create async methods for get and post . then we call then from our functions using await. let me know about it, i can start right away

£23 GBP in 1 day
(1 Review)
0.6
emre2880

İ can do it i am professional and i need money please give me a chance

£26 GBP in 10 days
(0 Reviews)
0.0
mohsinraza9

Dear Client, Please accept my warm greetings! I have quality experience in web development and will love to work for you. I have 7+ years experience as web and mobile applications developer in different roles fro More

£26 GBP in 10 days
(0 Reviews)
0.0
kselax

I can do it .

£26 GBP in 10 days
(1 Review)
0.0
Nilofarsolanki

I have done several async API Calling in past projects and love to work on this project, Please let me know if you wanted to do.

£26 GBP in 10 days
(0 Reviews)
0.0
neilzilla

Simple task, enjoy working with apis, all will be good! Plenty of experience in Javascript and editing custom code.

£13 GBP in 1 day
(0 Reviews)
0.0
caudilloo

I think the best thing is to show u an example right away from a project that i'm working on export const loadArticles = (category) => async dispatch => { try { let response = await fetch('/articles', { More

£26 GBP in 1 day
(0 Reviews)
0.0
soarlogics311

Dear Prospect Hiring Manager. Thank you for giving me a chance to bid on your project. i am a serious bidder here and i have already worked on a similar project before and can deliver as u have mentioned I have More

£29 GBP in 7 days
(0 Reviews)
0.0
Mihailovic0120

Hello. I just read your job description carefully. I have developed API integration project before. So as a web developer with rich experience in php and javascript, I will do my best and provide good services as you More

£25 GBP in 2 days
(0 Reviews)
0.0
sincrono

Can use dummy data in Json file and test application. Send the just data scama which need to pulled in report or just MSSQL database structure.

£26 GBP in 10 days
(0 Reviews)
0.0
£23 GBP in 3 days
(0 Reviews)
0.0
Shildra

Hi, dear! I've sufficient experience with javascript. Let's finish by today. Please trust me, and I will satisfy you. Thank you.

£10 GBP in 1 day
(0 Reviews)
0.0
Arijit3533

Currently I work onAjax based applications Relevant Skills and Experience I have been working on many Ajax based Reports where I request the Data from the user and inturn Generate reports using various JavaScript libr More

£19 GBP in 10 days
(0 Reviews)
0.0