Namespace: collections

collections

Methods

(static) create(options, done)

Create a collection

Parameters:
Name Type Description
options Object options
Properties
Name Type Description
name Number The name of the collection
title Number The title of the collection
color Number The color of the collection. Valid values are: brown,red,blue,light_green,green
background_image String The background image of the collection. Recommended: width: 1250px, height: 250px.
done done Callback
Source:
See:

(static) destroy(options, done)

Delete a collection

Parameters:
Name Type Description
options Object options
Properties
Name Type Description
id Number The id of the collection
done done Callback
Source:
See:

(static) index(optionsopt, done)

Get newest collections

Parameters:
Name Type Attributes Description
options Object <optional>
options
Properties
Name Type Attributes Description
params.older Number <optional>
Filter parameter: get only records older than the provided id
params.newer Number <optional>
Filter parameter: get only records newer than the provided id
params.per_page Number <optional>
Filter parameter: define the amount of records sent per call (max 50)
params.search.featured Boolean <optional>
Only return collections that have been featured on Product Hunt. true or false. Default = false.
params.search.category String <optional>
Only return collections from certain category. Default = unspecified (All categories)
params.sort_by String <optional>
Filter parameter: valid values are created_at, updated_at or featured_at
params.order String <optional>
Filter parameter: define the order you want to receive the records (does not affect older/newer behaviour). Valid values are asc or desc.
done done Callback
Source:
See:

(static) show(options, done)

Get details of a collection

Parameters:
Name Type Description
options Object options
Properties
Name Type Description
id Number The id of the collection
done done Callback
Source:
See:

(static) update(options, done)

Update a collection

Parameters:
Name Type Description
options Object options
Properties
Name Type Description
name Number The name of the collection
title Number The title of the collection
color Number The color of the collection. Valid values are: brown,red,blue,light_green,green
background_image String The background image of the collection. Recommended: width: 1250px, height: 250px.
done done Callback
Source:
See: