I'd like to access data from an jQuery/AJAX api within R. Is there a way to call jQueries in R?
These are some examples of AJAX requests, would be great if I could translate them into R code and get the response back into a data frame.
$.ajax("https://nestiolistings.com/api/v2/agents/?key=<your_key>")
Or a more complex one,
$.ajax({
url: "https://nestiolistings.com/api/v2/listings/350889/contact/?key=<your_api_key>",
type: 'POST',
data: {
name: 'John Doe',
email: 'johndoe@example.com',
phone: '(212)576-5847',
message: 'Lorem ipsum dolor sit amet, cu has labores adipiscing id.'
},
contentType: 'application/json'
})
Link to their API docs: http://developers.nestio.com/api/v2/listings.html#listing-contact
I also found this but it'd be great if I can get an example on how would this calls work on this specific API, and maybe there are other suggestions for jQuery packages within R. https://cran.r-project.org/web/packages/RSelenium/vignettes/RSelenium-basics.html