sbd.ninja v0.0.2 - Add Witness Info/Vote For Functions, Add Android Release
Project Info
- A Cross Platform STEEM Information Query Tool (Mac/Windows/iOS/Android)
- A lot of my friends need a native tool on Mobile (iOS/Android) to query steem related information, especially outdoors or on train.
Technology Stack
- Lua + Corona SDK
License
- MIT
Build
- sbd.ninja V0.0.2 - Mac & Windows & Android
- Bug report is welcome
Special Thanks
- Thanks to @justyy, who provides those free API for easy integration
- https://helloacm.com/tools/steemit/
New Features
- Commits is here:
9e39dc77f5b6588cdd155280bdaf5185e1ba9270 - Query Witness Info
local function queryWitnessInfo(username)
local body = "?cached&id=" .. username
local params = {}
params.body = body
network.request( "https://helloacm.com/api/steemit/witness/",
"POST",
function(event)
if ( event.isError ) then
print( "Network error: ", event.response )
else
print ( "RESPONSE: " .. event.response )
local witnessInfo = json.decode(event.response)
local detail = witnessInfo[1]
-- insert info into table view
for i = 0, #witnessInfo do
if i == 0 then
uiInfoTableView:insertRow({
isCategory = true,
params = {
text = username ..
" - Witness Info"
}
})
else
local rowHeight = math.ceil(display.contentHeight * 0.5 * 0.1)
uiInfoTableView:insertRow({
rowHeight = rowHeight,
params = {text = "name: " .. detail["name"]}})
uiInfoTableView:insertRow({
rowHeight = rowHeight,
params = {text = "created: " .. detail["created"]}})
uiInfoTableView:insertRow({
rowHeight = rowHeight,
params = {text = "url: " .. detail["url"]}})
uiInfoTableView:insertRow({
rowHeight = rowHeight,
params = {text = "votes: " .. detail["votes"]}})
uiInfoTableView:insertRow({
rowHeight = rowHeight,
params = {text = "running_version: " .. detail["running_version"]}})
uiInfoTableView:insertRow({
rowHeight = rowHeight,
params = {text = "total missed: " ..
detail["total_missed"]}})
uiInfoTableView:insertRow({
rowHeight = rowHeight,
params = {text = "account creation fee: " ..
detail["account_creation_fee"] .. " " ..
detail["account_creation_fee_symbol"]}})
uiInfoTableView:insertRow({
rowHeight = rowHeight,
params = {text = "maximum block size: " ..
detail["maximum_block_size"]}})
uiInfoTableView:insertRow({
rowHeight = rowHeight,
params = {text = "sbd exchange rate base: " ..
detail["sbd_exchange_rate_base"] .. " " ..
detail["sbd_exchange_rate_base_symbol"]}})
uiInfoTableView:insertRow({
rowHeight = rowHeight,
params = {text = "sbd_exchange_rate_quote: " ..
detail["sbd_exchange_rate_quote"] .. " " ..
detail["sbd_exchange_rate_quote_symbol"]}})
uiInfoTableView:insertRow({
rowHeight = rowHeight,
params = {text = "last confirmed block num: " ..
detail["last_confirmed_block_num"]}})
uiInfoTableView:insertRow({
rowHeight = rowHeight,
params = {text = "last aslot: " ..
detail["last_aslot"]}})
uiInfoTableView:insertRow({
rowHeight = rowHeight,
params = {text = "signing key: " .. detail["signing_key"]}})
end
end
end
end,
params )
end
- Query Witness Vote For
local function queryWitnessVoteFor(username)
local body = "?cached&id=" .. username
local params = {}
params.body = body
network.request( "https://helloacm.com/api/steemit/witness_votes/",
"POST",
function(event)
if ( event.isError ) then
print( "Network error: ", event.response )
else
print ( "RESPONSE: " .. event.response )
local witnessInfo = json.decode(event.response)
local votes = witnessInfo[1]["witness_votes"]
-- insert info into table view
for i = 0, #votes do
if i == 0 then
uiInfoTableView:insertRow({
isCategory = true,
params = {
text = username ..
" - Witness Vote For"
}
})
else
local rowHeight = math.ceil(display.contentHeight * 0.5 * 0.1)
uiInfoTableView:insertRow({
rowHeight = rowHeight,
params = {
text =
votes[i]
}
})
end
end
end
end,
params )
end
Bug Fix
- Commits are here
- Change the widget from text box to text field, for easy usage of mobile keyboard on / off:
bfe51388241032a122901008ea97da8c668dda88 - Change content scale type to adaptive: ee8de3cea56d1b11b0898a86ef977fd674bf0606
Roadmap
- Mac/Windows
- iOS/Android
- Account Information
- Delegation (In)
- Delegation (Out)
- Witness Info
- Followed/Following
- Profile
- Curation
- Converter
- Transfer History
- Votes
- More...
Contribution is Welcome
Github: https://github.com/bobdos/sbd.ninja
- Fork it!
- Create your feature branch: git checkout -b my-new-feature
- Commit your changes: git commit -am 'Add some feature'
- Push to the branch: git push origin my-new-feature
- Submit a pull request.
Posted on Utopian.io - Rewarding Open Source Contributors