Skip to content

Instantly share code, notes, and snippets.

@jakebellacera
Created February 7, 2014 09:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jakebellacera/8859804 to your computer and use it in GitHub Desktop.
Save jakebellacera/8859804 to your computer and use it in GitHub Desktop.
for a redditor
var appName = "yourAppName",
keywords = encodeURI("my search term"),
url = "http://svcs.ebay.com/services/search/FindingService/v1?OPERATION-NAME=findItemsByKeywords&SERVICE-VERSION=1.0.0&SECURITY-APPNAME=" + appName + "&RESPONSE-DATA-FORMAT=XML&REST-PAYLOAD&keywords=" + keywords;
$.get(url, function (response) {
console.log(response);
// response would be the parsed XML body.
// you could then work with this by treating it as an DOM
// node in jQuery. For example:
// response.find('elementName').html()
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment