request: function(formdata) { return { 'url' : 'http://gdata.youtube.com/feeds/api/videos', 'params': { 'v' : 2, 'max-results' : 20, 'alt' : 'jsonc', 'q' : formdata.keywords } }; }
results: function(json) { if (json.data && json.data.totalItems && json.data.totalItems == 0) { throw "No results found"; } var videos = json.data.items; var results_array = []; for (var i = 0; i < videos.length; i++) { var normalizedResult = { permalink : 'http://www.youtube.com/watch?v='+videos[i].id, source : 'youtube', elementClass : 'video', metadata : videos[i], thumbnail : videos[i].thumbnail.sqDefault, title: videos[i].title, description : videos[i].description.substr(0,140), author: {username: videos[i].uploader }, created_at : videos[i].uploaded, oembed: {html: '<iframe id="youtube-'+videos[i].id+'" type="text/html" width="360" height="294" src="http://www.youtube.com/embed/'+videos[i].id+'?enablejsapi=1&origin=storify.com" frameborder="0">' }}; results_array.push(normalizedResult); } return results_array;}
#googleio
http://storify.com/story/new?callback=yoursiteurlcallback
yoursiteurlcallback?permalink=storyPermalink
storyPermalink
<script src=”storyPermalink.js”></script>