What I want to do specifically is get the Vimeo thumbnail image by grabbing the json data returned by a request. I can’t use jquery due to the javascript file being a small remote file that the user calls and jquery would increase its size many many times.
I have looked and everything seems to be talking about jquery or getting it in another language (php for instance).
I have found I need to do this so far:
var script = document.createElement('script');
script.src = theUrlToMakeTheRequest;
document.getElementsByTagName('head')[0].appendChild(script);
I am not sure what I need to make the callback and not sure what I need to do to be able to use the url that gets appended.
From vimeo’s documentation
http://vimeo.com/api/docs/simple-api
It looks like you can put a ?callback=myfunction parameter on the end of the url to do a jsonp type of callback. So your code would maybe look something like this.
Their downloads page looks to have examples for just what you are trying to do.
http://vimeo.com/api/docs/downloads