UNPKG

omnipartners

Version:
73 lines (72 loc) 3.15 kB
"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const Api_1 = __importDefault(require("../../lib/Api")); const apiDecorators_1 = require("../../lib/apiDecorators"); class Data extends Api_1.default { languages(data) { return this._call("/service/data/get-languages", data); } countries(data) { return this._call("/service/data/get-countries", data); } titles(data) { return this._call("/service/data/get-user-titles", data); } animalTypes(data) { return this._call("/service/data/get-animal-types", data); } animalBreeds(data) { return this._call("/service/data/get-animal-breeds", data); } animalUniverses(data) { return this._call("/service/data/get-animal-universes", data); } subscriptions(data) { return this._call("/service/data/get-subscriptions", data); } _call(url, data = {}) { return this.get(url, data, { hash: false, hashNoKey: true, retry: true, }); } } __decorate([ (0, apiDecorators_1.doc)("http://doc.omnipartners.be/index.php/Language_list"), (0, apiDecorators_1.filterInput)(["lang"]) ], Data.prototype, "languages", null); __decorate([ (0, apiDecorators_1.doc)("http://doc.omnipartners.be/index.php/Country_list"), (0, apiDecorators_1.filterInput)(["lang", "indexed"]) ], Data.prototype, "countries", null); __decorate([ (0, apiDecorators_1.doc)("http://doc.omnipartners.be/index.php/User_title_list"), (0, apiDecorators_1.filterInput)(["lang"]) ], Data.prototype, "titles", null); __decorate([ (0, apiDecorators_1.doc)("http://doc.omnipartners.be/index.php/Animal_types_list"), (0, apiDecorators_1.filterInput)(["lang"]) ], Data.prototype, "animalTypes", null); __decorate([ (0, apiDecorators_1.doc)("http://doc.omnipartners.be/index.php/Animal_breeds_list"), (0, apiDecorators_1.filterInput)(["type", "lang"]) ], Data.prototype, "animalBreeds", null); __decorate([ (0, apiDecorators_1.doc)("http://doc.omnipartners.be/index.php/Animal_universes_list"), (0, apiDecorators_1.filterInput)(["type", "lang"]) ], Data.prototype, "animalUniverses", null); __decorate([ (0, apiDecorators_1.doc)("http://doc.omnipartners.be/index.php/Subscriptions_list"), (0, apiDecorators_1.filterInput)(["lang"]) ], Data.prototype, "subscriptions", null); exports.default = Data;