sbd.ninja v0.0.2 - Add Witness Info/Vote For Functions, Add Android Release
utopian-io·@bobdos·
0.000 HBDsbd.ninja v0.0.2 - Add Witness Info/Vote For Functions, Add Android Release
# 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](https://www.dropbox.com/sh/k0klsh19qgbrdva/AAB36s5-QLj0Oh3bMBWpd0BNa?dl=0) * Bug report is welcome ### Special Thanks * Thanks to @justyy, who provides those free API for easy integration * [https://helloacm.com/tools/steemit/](https://helloacm.com/tools/steemit/) ### New Features * Commits is here: [9e39dc77f5b6588cdd155280bdaf5185e1ba9270](https://github.com/bobdos/sbd.ninja/commit/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](https://github.com/bobdos/sbd.ninja/commit/bfe51388241032a122901008ea97da8c668dda88) * Change content scale type to adaptive: [ee8de3cea56d1b11b0898a86ef977fd674bf0606](https://github.com/bobdos/sbd.ninja/commit/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. <br /><hr/><em>Posted on <a href="https://utopian.io/utopian-io/@bobdos/sbd-ninja-v0-0-2-add-witness-info-vote-for-functions-add-android-release">Utopian.io - Rewarding Open Source Contributors</a></em><hr/>
👍 ety001, meixia, aafeng, tvb, mys, teamaustralia, steemnova, justyy, anxin, serenazz, ethanlee, sweet-jenny8, dailyfortune, dongfengman, jianan, moobear, prch, ashi0, dailystats, fanso, woolfe19861008, shentrading, geass, shengjian, vincenthan, dailychina, lilypang22, steemitvip, superbing, happyukgo, foodielifestyle, cha0s0000, cifer, annabellenoelle, davidke20, auleo, r3aperz, yumisee, joeliew, vamos-amigo, iipoh06, msp-lovebot, milenakolarova07, reyadapon, jacobcards, centerlink, cryptwo, choogirl, mikepedro, bmj, webcoop, trevorpetrie, bobdos, ausbitbank, jaycobbell, mumofmany, steemulator, steemsquad, shellyduncan, benleemusic, lordnigel, magicmonk, loshcat, greenorange, idx, abit, vandadream, utopian-1up, flauwy, stoodkev, ansonoxy, jamesbarraclough, maphics, mahdiyari, simonluisi, espoem, odebgaming, nathalie13, not-a-bird, bitopia, family.app, proffgodswill, sweeverdev, howtosteem, thatmemeguy, ronimm, makrotheblack, thinkkniht, onos, jesdn16, kslo, navx, sebastiengllmt, luoq, neexal, zlatkamrs, amosbastian, bobsthinking, rhotimee, blogger-funda, yeswanth, roj, nightdragon, jacintoelbarouki, opulence, dexter24, mufasatoldyou, damdap, varja, dethclad, deejee, photohunter1, photohunter2, photohunter3, zay-arasi, dyancuex, herman2141, xtramedium, luisrod, smafey, timmyeu, parag, ilovekrys, acrywhif, isacastillor, jerybanfield, solomon507, patatesyiyen, rsteem, onin91, isabella394, emailbox19149, videosteemit, matthewthonyit, lemony-cricket, exploreand, petvalbra, photohunter4, photohunter5, fmbs25, livsky, badmusazeez, aderemi01, killbill73, amirdesaingrafis, fai.zul, flinter, crispycoinboys, bluestorm, pepememes, flugbot, ilyastarar, jfuenmayor96, steaknsteem, handfree42, josh26, aliyu-s, animesukidesu, walnut1, elbleess, justdentist, omersurer, trabajadigital, masud222, eleonardo, checkthisout, not-a-cat, carsonroscoe, xplore, e-babil, kaking, kaylog, hmctrasher, charitybot, jayo, theagriculturist, derasmo, steemlore, truthtrader, oredebby, mrtech, charitymemes, brightex, lemcriq, olyup, ewuoso, murti, esme-svh, odesanya, estherekanem, toninux, fabiocola, olusolaemmanuel, blaize-eu, jdc, devilonwheels, abreu, steemassistant, cgbartow, bargolis, phasma, heshe-f, hillaryaa, idlebright, adhew, reyha, nataly2317, jrmiller87, gwapoaller, oguzhangazi, infoairdrops, dreamsss, turkishcrew, talaxy, fishlucy, arcjen02, mikefrancis, aellly, bonjovis, adm, bonv, sliverwang, joviye, linda65, fel1xw, tigerwangboth, cnbuddy, xiaoshancun, utopian-io, futuremind,