-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Example please #1
Comments
Hi, I have just updated the README.md with documentation for the library. I still need to document the last (highest level) module and include examples, which I will try to get done tomorrow. You can look at the tests for more information in the meantime. Here are a couple of simple examples to give you the gist of it: local redis = require'redis-client'
local client = redis.connect('localhost', 6379)
local resp = client:ping()
--[[
returns {
type = redis.response.STATUS,
data = 'PONG',
}
--]]
resp = client:get('string')
--[[
returns {
type = redis.response.STRING,
data = 'My string',
}
--]]
resp = client:lrange('list', 0, -1)
--[[
returns {
type = redis.response.ARRAY,
data = {
{ type = redis.response.STRING, data = 'list entry 1' },
{ type = redis.response.STRING, data = 'list entry 2' },
},
}
--]] |
Thank you! 🥰 |
I've finished the documentation in README.md, but have yet to write some examples. Comments welcome. |
Hi, can i get some examples?
The text was updated successfully, but these errors were encountered: