UNPKG

@publidata/utils-data-manager

Version:

Collection of methods to extract data from publidata

64 lines (60 loc) 1.18 kB
const PublidataObject = require("../"); /** * Class representing an item object * @extends PublidataObject */ class PublidataObjectItem extends PublidataObject { get source() { return this._source; } get id() { return this._source.id; } get name() { return this._source.name; } get garbage_type() { return this._source.garbage_type; } get image() { return this._source.image; } get average_size() { return this._source.average_size; } get average_weight() { return this._source.average_weight; } get brands() { return this._source.brands; } get brands() { return this._source.brands; } get synonyms() { return this._source.synonyms; } get variants() { return this._source.variants; } get slug() { return this._source.slug; } get suggestions() { return this._source.suggestions; } get components() { return this._source.components; } get groups() { return this._source.groups; } toJSON() { const json = {}; json.name = this.name; json.slug = this.slug; json.image = this.image; return json; } } module.exports = PublidataObjectItem;