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

Minor bugfix for invalid example json in documentation #569

Merged
merged 2 commits into from
Aug 12, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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