Client
A client for generating data using mockaroo.
Constructor Summary
| Public Constructor | ||
| public |
constructor(options: Object) Creates a new instance |
|
Method Summary
| Private Methods | ||
| private |
convertError(response: *): * Converts error messages from the mockaroo server to error classes |
|
| private |
Generates the rest api url |
|
| private |
validate() Validates that all required options have be specified. |
|
| private |
validateFields(fields: Object[]) |
|
Public Constructors
public constructor(options: Object) source
Creates a new instance
Params:
| Name | Type | Attribute | Description |
| options | Object | ||
| options.apiKey | string | Your mockaroo api key. See http://mockaroo.com/api/docs under "Gaining Access". |
|
| options.host | string |
|
The hostname of the mockaroo server. |
| options.port | int |
|
The port to use. |
| options.secure | boolean |
|
Set to false to use http instead of https |