steem-corona-sdk project is launching!

in #utopian-io6 years ago (edited)

image.png

steem corona sdk

License

  • MIT

Technology Stack

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

function get_config(callback)

  local params = {}

  network.request(
    "https://api.steemjs.com/get_config",
    "GET",
    callback,
    params)
end
function get_version(callback)

  local params = {}

  network.request(
    "https://api.steemjs.com/get_version",
    "GET",
    callback,
    params)
end
function get_account_count(callback)
  local params = {}

  network.request(
    "https://api.steemjs.com/get_account_count",
    "GET",
    callback,
    params)
end
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

https://github.com/bobdos


If you like this open source project, please vote @bobdos as steem witness.

Sort:  

Hi @bobdos, thanks for the contribution. I have never used Corona, but it looks pretty intuitive. Is there anything you want to make that gave you a reason to make steem-corona-sdk?

From what I can tell steem-corona-sdk isn't too useful in its current state, so I would recommend you try to do some more development for future contributions and add more features.


Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]

@amosbastian,

Actually, steem-corona-sdk is used in another open source project : mini-steemit as a sub-module

https://github.com/banacola-team/steem-corona-sdk/tree/c51a7bafe68446e95121652377cfe316fc591c1a

  • Corona-SDK: a very famous 2D game engine written in lua
  • mini-steemit: a simulation game of steemit, will be released to public in earlier July this year
  • steem-corona-sdk: a lua wrapper of steem APIs

The purpose of steem-corona-sdk is trying to embedded steem API into lua game engine Corona-SDK. It means players can vote/post/comment/transfer in-game directly.

It's a very important step for steem to expand its usage in game industry, especially in-game related function, such as IAP (in-game purchase), etc.

Hey @bobdos
Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Contributing on Utopian
Learn how to contribute on our website or by watching this tutorial on Youtube.

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!

Coin Marketplace

STEEM 0.30
TRX 0.12
JST 0.033
BTC 64222.08
ETH 3135.29
USDT 1.00
SBD 3.99