From 33a091148d08f55274d7537da56da2c88810282b Mon Sep 17 00:00:00 2001 From: adcpm <fabien@bonustrack.co> Date: Sat, 4 Feb 2017 10:02:57 +0700 Subject: [PATCH] Update examples --- examples/broadcast.html | 14 +++++++------- examples/index.html | 10 +++++----- examples/stream.html | 15 ++++----------- 3 files changed, 16 insertions(+), 23 deletions(-) diff --git a/examples/broadcast.html b/examples/broadcast.html index 49a7614..7033eac 100644 --- a/examples/broadcast.html +++ b/examples/broadcast.html @@ -1,19 +1,19 @@ <!DOCTYPE html> <html lang="en"> <head> - <meta charset="UTF-8"> - <title>Steem.js Broadcast</title> + <meta charset="UTF-8"> + <title>Steem.js Broadcast</title> </head> <body> <script src="../dist/steem.min.js"></script> <script> steem.broadcast.vote( - '5JRaypasxMx1L97ZUX7YuC5Psb5EAbF821kkAGtBj7xCJFQcbLg', - 'guest123', - 'firepower', - 'steemit-veni-vidi-vici-steemfest-2016-together-we-made-it-happen-thank-you-steemians', - 10000, + '5JRaypasxMx1L97ZUX7YuC5Psb5EAbF821kkAGtBj7xCJFQcbLg', // Posting WIF + 'guest123', // Voter username + 'firepower', // Author + 'steemit-veni-vidi-vici-steemfest-2016-together-we-made-it-happen-thank-you-steemians', // Permlink + 10000, // Weight (10000 = 100%) function(err, result) { console.log(err, result); } diff --git a/examples/index.html b/examples/index.html index b51de33..2da043f 100644 --- a/examples/index.html +++ b/examples/index.html @@ -1,21 +1,21 @@ <!DOCTYPE html> <html lang="en"> <head> - <meta charset="UTF-8"> - <title>Steem.js</title> + <meta charset="UTF-8"> + <title>Steem.js</title> </head> <body> <script src="../dist/steem.min.js"></script> <script> steem.api.getConfig(function(err, response){ - console.log(err, response); + console.log(err, response); }); steem.api.getAccounts(['ned', 'dan'], function(err, response){ - console.log(err, response); + console.log(err, response); }); steem.api.getAccountCount(function(err, response){ - console.log(err, response); + console.log(err, response); }); </script> diff --git a/examples/stream.html b/examples/stream.html index e9add22..ba6fae9 100644 --- a/examples/stream.html +++ b/examples/stream.html @@ -1,23 +1,16 @@ <!DOCTYPE html> <html lang="en"> <head> - <meta charset="UTF-8"> - <title>Steem.js</title> + <meta charset="UTF-8"> + <title>Steem.js Stream</title> </head> <body> <script src="../dist/steem.min.js"></script> <script> -steem.api.streamOperations(function(err, operations) { - if (err) { - document.write('Error:', err.message); - return; - } - +steem.api.streamOperations(function (err, operations) { operations.forEach(function (operation) { - document.write('New operation:', JSON.stringify(operation)); - console.log('New operation:', operation); - document.write('<br />'); + console.log(operation); }); }); </script> -- GitLab