Skip to content

Instantly share code, notes, and snippets.

@symac

symac/test.html

Created May 4, 2017
Embed
What would you like to do?
<!doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title></title>
<script src="pageviews.min.js"></script>
<script src="pageviews.min.js"></script>
<script>
// Getting pageviews for a single article
pageviews.getPerArticlePageviews({
article: 'Berlin',
project: 'en.wikipedia',
start: new Date(new Date() - 3 * 24 * 60 * 60 * 1000), // YYYYMMDD string or Date object
end: new Date(new Date() - 2 * 24 * 60 * 60 * 1000) // YYYYMMDD string or Date object
}).then(function(result) {
console.log(JSON.stringify(result, null, 2));
}).catch(function(error) {
console.log(error);
});
/* All functions as defined in the Node.js section */
</script>
</head>
<body>
Test page
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.