Class: Category

Category(dataopt)

Represents a Category

Constructor

new Category(dataopt)

Create a new instance of a category
Parameters:
Name Type Attributes Description
data object <optional>
API response data.
Properties
Name Type Attributes Default Description
category_id number <optional>
0 The category id. i.e. - 10
category_name string <optional>
The category name. i.e. - Container
parent_id number <optional>
The parent category id or 0 if root category. i.e. - 0
Source:

Classes

Category

Members

category_id :number

Type:
  • number
Source:

category_name :string

Type:
  • string
Source:

parent_id :number

Type:
  • number
Source:

Methods

(static) all() → {BricklinkRequest}

Get a list of all colors Usage: ``` var req = Category.all(); client.send(req).then(categories => console.log(categories)); ```
Source:
Returns:
A request that resolves to an array of Category.
Type
BricklinkRequest

(static) get(categoryId) → {BricklinkRequest}

Method to get a specific category Usage: ``` var req = Category.get(123); client.send(req).then(category => console.log(category)); ```
Parameters:
Name Type Description
categoryId number Catalog item type
Source:
Returns:
A request that resolves to a Category instance.
Type
BricklinkRequest