Skip to content

Instantly share code, notes, and snippets.

@scripting
Last active August 29, 2015 14:03
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save scripting/75de472d0e3ccf183448 to your computer and use it in GitHub Desktop.
Save scripting/75de472d0e3ccf183448 to your computer and use it in GitHub Desktop.
Minimal code for reading a river
<html>
<head>
<title>Minimal River Reader</title>
<script src="http://fargo.io/code/jquery-1.9.1.min.js"></script>
</head>
<body>
<script>
var theRiver;
function onGetRiverStream (updatedFeeds) {
theRiver = updatedFeeds;
}
$.ajax ({
url: "http://rss.scripting.com/rivers/nytRiver.js",
dataType: "jsonp"
});
</script>
</body>
</html>
@scripting
Copy link
Author

In case you don't know, the format it's reading is documented:

http://riverjs.org/

@andysylvester
Copy link

Dave, I have created a sample app at https://github.com/andysylvester/minimal-riverjs-reader using your code, see my post at http://andysylvester.com/2014/07/14/minimal-river-js-reader/ for more info. Thanks for posting this code!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment