Constructor
new Color(dataopt)
Create a new instance of a color
Parameters:
Name | Type | Attributes | Description | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data |
object |
<optional> |
API response data.
Properties
|
- Source:
Classes
Members
color_code :string
Type:
- string
- Source:
color_id :number
Type:
- number
- Source:
color_name :string
Type:
- string
- Source:
color_type :string
Type:
- string
- Source:
Methods
(static) all() → {BricklinkRequest}
Get a list of all colors
Usage:
```
var req = Color.all();
client.send(req).then(colors => console.log(colors));
```
- Source:
Returns:
A request that resolves to an array of Color.
- Type
- BricklinkRequest
(static) get(colorId) → {BricklinkRequest}
Method to get specific color details
Usage:
```
var req = Color.get(10);
client.send(req).then(color => console.log(color));
```
Parameters:
Name | Type | Description |
---|---|---|
colorId |
number | a color id. |
- Source:
Returns:
A request that resolves to a Color instance.
- Type
- BricklinkRequest