Skip to content

This library provide wrapper functions for Corona sdk that provide access to the baasbox REST API.

License

Notifications You must be signed in to change notification settings

giastfader/baasbox-corona-lib-

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

baasbox-corona-lib-

This library provide wrapper functions for Corona sdk that provide access to the baasbox REST API.

Samples

local baas = require( "BaasBox" )
-- ServerURL:PORT, ApplicationCode
baas.init("http://serverURL:9001", "1111111")

local callbackFunc = function(event)
-- TODO
end

baas.signUp("userName", "Pass", callbackFunc)
baas.logout(callbackFunc)<

``` local json = require ("json") local data = {b=1}

baas.createDocument("CollectionName", data, function(event) baas.addRoleDocumentPermission("level", json.decode(event.response).data.id, "read", "registered", function(e) print("Permission done...") end) end)

<hr>

local json = require ("json") baas.getDocument("level", "625ff1cf-a0c0-414a-908e-280c79854d19", function(event) print(json.decode(event.response).result) print(json.decode(event.response).data.levelData.data) end)

About

This library provide wrapper functions for Corona sdk that provide access to the baasbox REST API.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Lua 100.0%