lindex

// Using callbacks (NodeJS or Web Browser)
kuzzle.memoryStorage.lindex('key', 3, function (err, value) {
  // callback called once the action has completed
});

// Using promises (NodeJS only)
kuzzle.memoryStorage.lindexPromise('key', 3)
  .then(value => {
    // resolved once the action has completed
  });
kuzzle.memoryStorage.lindex("key", 3, new ResponseListener<String>() {
  @Override
  public void onSuccess(String value) {
    // callback called once the action has completed
  }

  @Override
  public void onError(JSONObject error) {
  }
});
<?php

use \Kuzzle\Kuzzle;


$kuzzle = new Kuzzle('localhost');

try {
  $value = $kuzzle->memoryStorage()->lindex('key', 3);
}
catch (ErrorException $e) {

}

Callback response:

"foo"

Returns the element at the provided index in a list.

[Redis documentation]


lindex(key, index, [options], callback)

ArgumentsTypeDescription
keystringKey identifier
indexintElement position in the list
optionsJSON ObjectOptional parameters
callbackfunctionCallback

Options

OptionTypeDescriptionDefault
queuablebooleanMark this request as (not) queuabletrue

Callback response

Resolves to a string containing the retrieved element's value.