0.1.0 • Published 8 years ago

cordlr-request v0.1.0

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

cordlr-request NPM version Build Status

Cordlr request plugin

Installation

$ npm install --save cordlr-request

Then add it to your config.

{
  "plugins": [
    "cordlr-request"
  ],
  "request": {
    "format": "```{{url}}\n{{list}}```", // How should the reply be formatted
    "listFormat": "\t{{name}}: {{val}}", // How should list items be formatted
    "error": "An error occured while trying to connect to {{url}}" // How should error messages be formatted
  }
}

Usage

request <url> [...properties]

You can access properties by using dot notation to access object properties, all properties are the ones provided by the (request)https://www.npmjs.com/package/request package.

For example,

request https://imsean.me statusCode request.uri.protocol

should yield

https://imsean.me
    statusCode: 200
    request.uri.protocol: https:

License

MIT © Sean Wilson