Requesting Google API directly from Max ?
Hi there,
a student of mine wants to request Google API.
Basically, we know how to do that by using JS and a browser, but we want to catch a picture in the page.
In order to "intercept" this, Max or Processing driving the process would be better.
Did someone already make that with JS inside Max ? I mean, connecto to Custom Search API and parse results ?
Another option would be to request the basic search URL, and to parse the results. But I cannot have any result by using jit.uldl for that.
Any idea would be very appreciate.
Best,
Julien
Hi Julien, i am not really familiar with the google api. is REST or SOAP? in any case it sounds like the new maxurl object could do the job.
jan
Depending on what needs to be done, you can use Curl commands with the [shell] object.
I would suggest the newly created [maxurl] object, which stores resulting pages/etc. in a max dict object. From there you could parse the image out? Another option would be to return a json object from a google image search, which you could easily parse, download and write to disk.
thanks for your answers.
problem is the google api (custom search new way)
I'd like to use it inside js in max.
but maybe this is the wrong way and pure curl/maxurl download + parsing can do the job.
Passing maxurl >> Dictionary >> Js object might be a middle ground? There's a relatively simple method for pulling data from a named Dict object into the js object here: https://cycling74.com/wiki/index.php?title=Parsing_Dict_files_to_Javascript_objects
check out the helpfile for maxurl. you can now make http requests directly from js.