get_vram_row
Fetch using code, scope, table, primary_key.
1
import { getClient } from "./client";
2
​
3
(async () => {
4
const service = await (await getClient()).service('ipfs','cardgame1112');
5
​
6
const response = await service.get_vram_row( "cardgame1112", "cardgame1112", "users", "nattests" );
7
console.log(response);
8
// { username: 'nattests',
9
// win_count: 0,
10
// lost_count: 0,
11
// game_data:
12
// { life_player: 5,
13
// life_ai: 5,
14
// deck_player:
15
// [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 ],
16
// deck_ai:
17
// [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 ],
18
// hand_player: [ 0, 0, 0, 0 ],
19
// hand_ai: [ 0, 0, 0, 0 ],
20
// selected_card_player: 0,
21
// selected_card_ai: 0,
22
// life_lost_player: 0,
23
// life_lost_ai: 0,
24
// status: 0 } }
25
})().catch((e) => { console.log(e); });
Copied!
Copy link