steem corona sdk
License
- MIT
Technology Stack
- Lua + Corona SDK
How to Run It
- Download Corona SDK
- Git clone https://github.com/banacola-team/steem-corona-sdk
- Open "Corona Simulator" in Corona SDK
- "Open Project" on "Corona Simulator" Panel (or File -> Open)
- Choose steam-corona-sdk folder
- Then you can see Demo is launching in Corona Simulator
- Then you can see Log information in "Corona Simulator Console"
File Structure
- steem-corona.lua is the wrapper of steem api into corona sdk.
- main.lua is the demo of test cases, to show how to call the steem APIs in corona sdk.
Features
- get config
git commit
function get_config(callback)
local params = {}
network.request(
"https://api.steemjs.com/get_config",
"GET",
callback,
params)
end
- get version
git commit
function get_version(callback)
local params = {}
network.request(
"https://api.steemjs.com/get_version",
"GET",
callback,
params)
end
- get account count
git commit
function get_account_count(callback)
local params = {}
network.request(
"https://api.steemjs.com/get_account_count",
"GET",
callback,
params)
end
- comment
git commit
function comment(
parent_author,
parent_permlink,
author,
permlink,
title,
body,
json_metadata)
native.showWebPopup(
0,
0,
display.contentWidth,
display.contentHeight,
"https://v2.steemconnect.com/sign/comment?"..
"parent_author="..parent_author..
"&parent_permlink="..parent_permlink..
"&author="..author..
"&permlink="..permlink..
"&title="..urlEncode(title)..
"&body="..urlEncode(body)..
"&json_metadata="..json_metadata,
{
urlRequest =
function(event)
local shouldLoad = true
local url = event.url
if url then
print( "You are visiting: " .. event.url )
if 1 == string.find( url, "corona:close" ) then
-- Close the web popup
shouldLoad = false
end
if string.find(url, "success") then
shouldLoad = false
end
end
if event.errorCode then
-- Error loading page
print( "Error: " .. tostring( event.errorMessage ) )
shouldLoad = false
end
return shouldLoad
end
}
)
end
Roadmap
- Will implement most of the APIs listed on steemjs
Contribution is Welcome
Github: https://github.com/banacola-team/steem-corona-sdk
- 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.
GitHub Account
If you like this open source project, please vote @bobdos as steem witness.