From cfa2b3338d78540d9d6f638afe79e24ac0384b3a Mon Sep 17 00:00:00 2001 From: Mahdi Yari <m.yary16@gmail.com> Date: Tue, 3 Nov 2020 18:52:37 +0330 Subject: [PATCH] Update README.md --- doc/README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/doc/README.md b/doc/README.md index 7d2d03e..50f46b6 100644 --- a/doc/README.md +++ b/doc/README.md @@ -959,6 +959,23 @@ Return Example: } ] ``` +Using the Result: +```js +// Extract delegatee names from the result into an array of account name strings +var f = result.map(function(item) { return item.delegatee; }); +console.log(f); + +// Get the last tag for subsequent calls to `getVestingDelegations` +// or use: f[f.length - 1] if you used the extraction code above. +var lastKnownDelegatee = result[result.length - 1].delegatee; + +// Use the last known delegatee to get the next group of delegatees +hive.api.TrendingTags('mahdiyari', lastKnownDelegatee, 2, function(err, result) { + console.log(err, result); +}); +``` + +See also: [accountCreateWithDelegation](#account-create-with-delegation), [delegateVestingShares](#delegate-vesting-shares) ## Keys -- GitLab