[Dev] Postsサービスをsteemライブラリに変更中

in #japanese2 days ago (edited)

こんにちは、@yasuです。

https://steememory.com/ サイトを改善しています。

実際に変更したところ(ソース抜粋)

app.js

変更後変更前
const steem = require('@steemit/steem-js').steem;const dsteem = require('dsteem');
steem.api.setOptions({ url: 'https://api.steememory.com' });let client = new dsteem.Client( 'https://api.steememory.com');
ret = await steem.api.callAsync( 'condenser_api.get_account_history',[query.account, query.start, query.limit]);ret = await client.database.call( 'get_account_history',[query.account, query.start, query.limit]);
ret = await steem.api.callAsync( 'condenser_api.get_discussions_by_blog',[{"tag": query.tag,"limit": query.limit,"start_author": query.start_author,"start_permlink": query.start_permlink}]);ret = await client.database.getDiscussions( "blog", query)
const result = await steem.api.callAsync( 'condenser_api.get_content', [author, permlink]);const result = await callAsync( 'condenser_api','get_content',[author, permlink])