function Client(options) { _classCallCheck(this, Client); this.options = options || {}; this.request = new _web2.default.Request(this.options); }
...
Methods optionally accept a callback argument - when supplied, the function will execute the callback with two arguments (`err`
and `results`). When omitted, the method call will return a Promise.
### Constructor
When constructing the craigslist client, options specified are used for all subsequent requests (i.e. [#list](#list) and [#search
](#search)).
**Usage:** `new craigslist.Client(options)`
* `options` - _(optional)_ - can be used to supply additional options - see [Options](#options) for details
* `city` - _(optional)_ - defines the city for the search (_NOTE: this field is required by [#list](#list) and [#search](#search
) when not specified in the constructor_)
* `baseHost` - _(optional)_ - allows for specification of the base domain (defaults to `craiglist.org`) to support other countries
(i.e. for Canada, `craigslist.ca`)
* `maxAsk` - _(optional)_ - maximum price
* `minAsk` - _(optional)_ - minimum price
* `category` - _(optional)_ - allows for specification of the category (defaults to `sss`) to search in other categories
...
function Client(options) { _classCallCheck(this, Client); this.options = options || {}; this.request = new _web2.default.Request(this.options); }
...
Methods optionally accept a callback argument - when supplied, the function will execute the callback with two arguments (`err`
and `results`). When omitted, the method call will return a Promise.
### Constructor
When constructing the craigslist client, options specified are used for all subsequent requests (i.e. [#list](#list) and [#search
](#search)).
**Usage:** `new craigslist.Client(options)`
* `options` - _(optional)_ - can be used to supply additional options - see [Options](#options) for details
* `city` - _(optional)_ - defines the city for the search (_NOTE: this field is required by [#list](#list) and [#search](#search
) when not specified in the constructor_)
* `baseHost` - _(optional)_ - allows for specification of the base domain (defaults to `craiglist.org`) to support other countries
(i.e. for Canada, `craigslist.ca`)
* `maxAsk` - _(optional)_ - maximum price
* `minAsk` - _(optional)_ - minimum price
* `category` - _(optional)_ - allows for specification of the category (defaults to `sss`) to search in other categories
...