Official LUA SDK for Kuzzle http://docs.kuzzle.io/sdk-reference
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.github
sdk-cpp @ 387eaea
swig
.gitmodules
LICENSE
Makefile
README.md

README.md

Official Kuzzle LUA SDK - ALPHA VERSION

About Kuzzle

A backend software, self-hostable and ready to use to power modern apps.

You can access the Kuzzle repository on Github

SDK Documentation

The complete SDK documentation is available here

Protocol used

The LUA SDK implements the websocket protocol.

Dependencies

You need the liblua5.3-dev.

Build

Execute the following snippet to clone the GIT repository, and build the SDK. It will then be available in the "build/" directory

git clone --recursive git@github.com:kuzzleio/sdk-lua.git
git submodule update --init --recursive
cd sdk-lua
make

Example

require('kuzzlesdk');

kuzzle = kuzzlesdk.Kuzzle("localhost");

-- connect
kuzzle:connect();
-- get Kuzzle timestamp
timestamp = kuzzle.server:now();
print(timestamp);

-- Create an index
kuzzle.index:create("index");
-- Create a collection in the index
kuzzle.collection:create("index", "collection")

-- Create a document in the collection
res = kuzzle.document:create("index", "collection", "", "{\"name\": \"Joe\"}");
-- Print the json response
print(res);
-- Disconnect from Kuzzle
kuzzle:disconnect();