Skip to content

Instantly share code, notes, and snippets.

@overthemike
Created April 3, 2017 22:25
Show Gist options
  • Save overthemike/63e7bc14c264efabe2bbe7029fdb6c81 to your computer and use it in GitHub Desktop.
Save overthemike/63e7bc14c264efabe2bbe7029fdb6c81 to your computer and use it in GitHub Desktop.
// make sure to yarn add jquery
import $ from 'jquery'
import store from './store'
function getData() {
$.getJSON('https://api.etsy.com/v2/listings/active.js?api_key=h9oq2yf3twf4ziejn10b717i&keywords=whiskey&includes=Images,Shop&callback=?', function(data){
store.dispatch({
type: 'GET_DATA',
action: data.results
})
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment