오늘의 개발일지 2020년05월05일 eclipse + node js에서 steem api 사용해보기
안녕하세요 가야태자()입니다. 오늘은 eclipse 상에서 node js 코드를 실행해보려고 합니다.
https://steemit.com/kr/@minari/node-js-1-steem-js
정말 오래된 글인데 위의 글을 일단 참고 했습니다.
https://github.com/steemit/steem-js/tree/master/doc
얘도 참고 했습니다.
https://copycoding.tistory.com/25
그리고 얘도 참고 했습니다.
일단 코드를 작성 합니다.
저는 그냥 제아이디로 대체를 했습니다.
/**
* eclipse에서 node js steem.js 사용해보기
*/
var steem = require('steem');
steem.api.getAccounts(['talkit'], function(err, response) {
console.log(err,response);
}
);
음 그리고 그냥 test.js를 오른쪽 마우스 클릭하고, as node program 을 클릭 했습니다.
그런데 오류 납니다.
steem 라이버러리를 사용할 수 없다네요.
^^
예전에 nodejs에서는
npm install steem --save
이렇게 치면 해결이 가능했습니다.
그런데 eclipse에서는 package.json 파일을 더블클릭해서
,
"dependencies": {
"steem": "*"
}
얘를 package.json 파일에 추가 하십시오.
대충 이런 모습이 되었습니다.
package.json 파일에서 오른쪽 마우스 누르고 Run as 누르고 npm install 을 클릭하시면 뭔가 나오면서 설치를 진행합니다.
캡쳐를 못했지만
54개정도의 뭔가가 설치되었다고 이야기를 했습니다.
그런데 저는 steem 만 설치했는데 뭐가 저리 많이 실치 된건가요?
아마도 "*" 때문인것도 같습니다. ^^
그리고 다시
test.js를 오른쪽 마우스 클릭하고, Run as >> node program 으로 실행하면 됩니다.
C:\Program Files\nodejs\node.exe test.js
null [
{
id: 524555,
name: 'talkit',
owner: { weight_threshold: 1, account_auths: [], key_auths: [Array] },
active: { weight_threshold: 1, account_auths: [], key_auths: [Array] },
posting: { weight_threshold: 1, account_auths: [Array], key_auths: [Array] },
memo_key: 'STM6x2Lh1KaXaHn1Uvk3g4RMTkDJqmrZDyJRXdoRJQdcRymmKCLgv',
json_metadata: '{"profile":{"website":"http://talkit.tistory.com","name":"kayaepirnce","about":"저는 IT에 관심이 많습니다. / I interest in Information Technology.","location":"광명/KwangMyung, KyungGi-Do, ROK","dtube_pub":"24PQibynDR1p2jQ7Y9WKuQFP12B6Ebut9cz58AbG32sSL"}}',
posting_json_metadata: '{"profile":{"website":"http://talkit.tistory.com","name":"kayaepirnce","about":"저는 IT에 관심이 많습니다. / I interest in Information Technology.","location":"광명/KwangMyung, KyungGi-Do, ROK","dtube_pub":"24PQibynDR1p2jQ7Y9WKuQFP12B6Ebut9cz58AbG32sSL"}}',
proxy: 'asbear',
last_owner_update: '1970-01-01T00:00:00',
last_account_update: '2020-03-03T15:06:15',
created: '2017-12-24T12:48:30',
mined: false,
recovery_account: 'steem',
last_account_recovery: '1970-01-01T00:00:00',
reset_account: 'null',
comment_count: 0,
lifetime_vote_count: 0,
post_count: 3954,
can_vote: true,
voting_manabar: { current_mana: '1215498246484', last_update_time: 1588607796 },
downvote_manabar: { current_mana: '311573418450', last_update_time: 1588607796 },
voting_power: 9451,
balance: '7.347 STEEM',
savings_balance: '0.000 STEEM',
sbd_balance: '12.295 SBD',
sbd_seconds: '22310717298',
sbd_seconds_last_update: '2020-05-04T15:56:36',
sbd_last_interest_payment: '2020-04-09T23:27:51',
savings_sbd_balance: '0.000 SBD',
savings_sbd_seconds: '0',
savings_sbd_seconds_last_update: '2018-02-09T15:19:24',
savings_sbd_last_interest_payment: '2018-02-09T15:19:24',
savings_withdraw_requests: 0,
reward_sbd_balance: '0.000 SBD',
reward_steem_balance: '0.000 STEEM',
reward_vesting_balance: '42.981938 VESTS',
reward_vesting_steem: '0.022 STEEM',
vesting_shares: '1286448.367627 VESTS',
delegated_vesting_shares: '119543.043625 VESTS',
received_vesting_shares: '79388.349800 VESTS',
vesting_withdraw_rate: '0.000000 VESTS',
next_vesting_withdrawal: '1969-12-31T23:59:59',
withdrawn: 0,
to_withdraw: 0,
withdraw_routes: 0,
curation_rewards: 20195,
posting_rewards: 953963,
proxied_vsf_votes: [ 0, 0, 0, 0 ],
witnesses_voted_for: 0,
last_post: '2020-05-04T12:16:09',
last_root_post: '2020-05-04T12:16:09',
last_vote_time: '2020-05-04T12:19:30',
post_bandwidth: 0,
pending_claimed_accounts: 0,
vesting_balance: '0.000 STEEM',
reputation: '19929545962250',
transfer_history: [],
market_history: [],
post_history: [],
vote_history: [],
other_history: [],
witness_votes: [],
tags_usage: [],
guest_bloggers: []
}
]
오 제가 가지고 있는 정보들이 쫙 뿌려 집니다.
오늘은 여기까지 하고
또 시간 나는대로 진행해보겠습니다.
감사합니다.
Leave 오늘의 개발일지 2020년05월05일 eclipse + node js에서 steem api 사용해보기 to:
Read more #actnearn posts
Best Posts From kayaepirnce
We have not curated any of talkit's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.
More Posts From kayaepirnce
- [M2E#0423] 2025-04-06 - 오늘의 운동 완료(5.77/5) - Today's workout complete.
- [M2E#0412] 2025-03-27 - 오늘의 운동 완료(6.23/5) - Today's workout complete.
- [M2E#0411] 2025-03-26 - 오늘의 운동 완료(7.2/5) - Today's workout complete.
- [M2E#0410] 2025-03-25 - 오늘의 운동 완료(9.33/5) - Today's workout complete.
- [M2E#0408] 2025-03-24 - 어제의 운동 완료(6.77/5) - Today's workout complete.
- [M2E#0406] 2025-03-22 - 어제의 운동 완료(9.01/5) - Today's workout complete.
- [M2E#0407] 2025-03-23 - 어제의 운동 완료(7.98/5) - Today's workout complete.
- [M2E#0290] 2024-11-01 - 오늘의 운동 완료(6.75/4km)/(85.4/86.4)
- talkit.tistory.com 블로그 근황.
- 노마드 태스크 출금하기
- 하이브 토큰이 불타 올랐습니다. ^^
- 새해 복 많이 받으시고, 스팀엔진/하이브엔진 토큰 정리 III
- 아듀 2020 가족 쫑 파티
- MacOS에서 Notepad++ 을 대신할 프로그램들은 뭐가 있을가? Brackets(?) 설치
- Mac OS에 Notepad++ 을 설치해보자(실패기)
- 오랫만에 글을 적네요. 아하 토큰 출금기 입니다. ^^
- 오늘의 개발일지 2020년06월11일 Java 파일(File) 이동(Move) 시키기 예제(Example)
- 오늘의 개발일지 2020년06월09일 Java 파일에서 원하는 문자열 찾기
- 오늘의 투자일지 2020년06월06일 이오봇 현황 #022 및 바이낸스 현황 #005
- 오늘의 개발일지 2020년06월02일 TortoiseSVN 사용하기