HTTPS SSH

lr360-play

A LR360 client tools to help testing the platform rules.

Install

npm install -g @lr360/lr360-play

Configuration

To use a default endpoint and access key, you need to create config.json file. If no options are specified, the tool will load the config.json from root folder. Every options are optional.

config.json

{
    "endpoint": "https://demo-api.fidem360.com",
    "key": "API_KEY",
    "secret": "SECRET_KEY"
}

context.json

To use a default context and access keys, you need to create context.json file. If no options are specified, the tool will load the context.json from root folder. Every options are optional.

{
    "device": "Device identifier [optional]",
    "session": "Session identifier [optional]",
    "member": "Member identifier [optional]",
    "coordinates": {
      "lat": 45.5087,
      "long": -73.554
    },
    "beacon": {
      "id": "Beacon id -  If id is specified, the code will not be taking into account",
      "code": "Beacon code",
      "distance": "RSSI value (-110 to -10)"
    }
}

Usage

Usage: lr360-play [options] [command] [command-options]

Commands:

    ...

Options:

  -h, --help               Output usage information
  -V, --version            Output the version number

  -c, --config FILE_PATH   Uses this config file, if not specified, it will use config.json
  -u, --endpoint URL       Uses this endpoint to hit the platform API
  -k, --key API_KEY        Uses this access key
  -p, --secret SECRET_KEY  Uses this secret key

  -x, --context FILE_PATH  Uses this context file, if not specified, it will use context.json
  -d, --device DEVICE_ID   Sets the device identifier
  -s, --session SESSION_ID Sets the session identifier
  -m, --member MEMBER_ID   Sets the member identifier

  -e, --env ENV            Sets the environment.  Will prefix defaults file with the environment name.  Ex: demo-context.json
  -r, --raw-response       Saw the raw json response (JSON without transformation)

License

MIT