Created
April 3, 2017 22:25
-
-
Save overthemike/63e7bc14c264efabe2bbe7029fdb6c81 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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