steem-corona-sdk project is launching!

View this thread on: d.buzz | hive.blog | peakd.com | ecency.com
·@bobdos·
0.000 HBD
steem-corona-sdk project is launching!
![image.png](https://ipfs.busy.org/ipfs/QmQZV7MJJ1ps5dAdBjC3qcgd6MJqvEd87hra8Q3xLZh8Wp)

# steem corona sdk
* [https://github.com/banacola-team/steem-corona-sdk](https://github.com/banacola-team/steem-corona-sdk)
* Wrapping [STEEM API](https://v2.steemconnect.com/docs/steemjs) into [Corona SDK](https://coronalabs.com)

# License
* MIT

# Technology Stack
* Lua + [Corona SDK](https://coronalabs.com)

# How to Run It

* Download [Corona SDK](https://coronalabs.com)
* 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](https://github.com/banacola-team/steem-corona-sdk/blob/master/steem-corona.lua) is the wrapper of steem api into corona sdk.
* [main.lua](https://github.com/banacola-team/steem-corona-sdk/blob/master/main.lua) is the demo of test cases, to show how to call the steem APIs in corona sdk.

# Features
* get config
[git commit](https://github.com/banacola-team/steem-corona-sdk/commit/4b3bd25cd762066de350d697f72c3fcee95e58a1)
```
function get_config(callback)

  local params = {}

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

* get version
[git commit](https://github.com/banacola-team/steem-corona-sdk/commit/4b3bd25cd762066de350d697f72c3fcee95e58a1)
```
function get_version(callback)

  local params = {}

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

* get account count
[git commit](https://github.com/banacola-team/steem-corona-sdk/commit/d0d1630a7ea34885dade043c17555316822c47cf)
```
function get_account_count(callback)
  local params = {}

  network.request(
    "https://api.steemjs.com/get_account_count",
    "GET",
    callback,
    params)
end
```

* comment
[git commit](https://github.com/banacola-team/steem-corona-sdk/commit/3a5801d8beb22e875346aacf62178e3b82f6c11c)
```
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](https://v2.steemconnect.com/docs/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](https://github.com/bobdos)

---
If you like this open source project, please [vote @bobdos as steem witness](https://v2.steemconnect.com/sign/account-witness-vote?witness=bobdos&approve=1).

👍 , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,