Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
Merge pull request #569 from kdmukai/patch-1
Browse files Browse the repository at this point in the history
Minor bugfix for invalid example json in documentation
  • Loading branch information
Cody Douglass authored Aug 12, 2019
2 parents 3d6c39c + e4d6240 commit 4a27bf1
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions docs/4.-Reading blockchain-Examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ Get the first 10 token balances of account _testacc_.
const resp = await rpc.get_table_rows({
json: true, // Get the response as json
code: 'eosio.token', // Contract that we target
scope: 'testacc' // Account that owns the data
table: 'accounts' // Table name
scope: 'testacc', // Account that owns the data
table: 'accounts', // Table name
limit: 10, // Maximum number of rows that we want to get
reverse = false, // Optional: Get reversed data
show_payer = false, // Optional: Show ram payer
reverse: false, // Optional: Get reversed data
show_payer: false, // Optional: Show ram payer
});

console.log(resp.rows);
Expand All @@ -45,12 +45,12 @@ Output:
const resp = await rpc.get_table_rows({
json: true, // Get the response as json
code: 'contract', // Contract that we target
scope: 'contract' // Account that owns the data
table: 'profiles' // Table name
lower_bound: 'testacc' // Table primary key value
scope: 'contract', // Account that owns the data
table: 'profiles', // Table name
lower_bound: 'testacc', // Table primary key value
limit: 1, // Here we limit to 1 to get only the
reverse = false, // Optional: Get reversed data
show_payer = false, // Optional: Show ram payer
reverse: false, // Optional: Get reversed data
show_payer: false, // Optional: Show ram payer
});
console.log(resp.rows);
```
Expand All @@ -74,13 +74,13 @@ Output:
const resp = await rpc.get_table_rows({
json: true, // Get the response as json
code: 'contract', // Contract that we target
scope: 'contract' // Account that owns the data
table: 'profiles' // Table name
table_key: 'age' // Table secondaray key name
lower_bound: 21 // Table secondary key value
scope: 'contract', // Account that owns the data
table: 'profiles', // Table name
table_key: 'age', // Table secondaray key name
lower_bound: 21, // Table secondary key value
limit: 1, // Here we limit to 1 to get only row
reverse = false, // Optional: Get reversed data
show_payer = false, // Optional: Show ram payer
reverse: false, // Optional: Get reversed data
show_payer: false, // Optional: Show ram payer
});
console.log(resp.rows);
```
Expand Down

0 comments on commit 4a27bf1

Please sign in to comment.