languages.js 1.3 KB

1234567891011121314151617181920212223242526272829303132
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.Languages = void 0;
  4. const language_1 = require("../models/language");
  5. const base_collection_1 = require("./base_collection");
  6. class Languages extends base_collection_1.BaseCollection {
  7. static rootElementName = "languages";
  8. static rootElementNameSingular = "language";
  9. static prefixURI = "projects/{!:project_id}/languages/{:id}";
  10. static elementClass = language_1.Language;
  11. system_languages(params = {}) {
  12. return this.createPromise("GET", params, this.populateArrayFromJson, this.handleReject, null, "system/languages");
  13. }
  14. list(request_params) {
  15. return this.doList(request_params);
  16. }
  17. create(raw_body, request_params) {
  18. const body = { languages: this.objToArray(raw_body) };
  19. return this.doCreate(body, request_params, this.populateArrayFromJsonBulk);
  20. }
  21. get(lang_id, request_params) {
  22. return this.doGet(lang_id, request_params);
  23. }
  24. update(lang_id, lang_params, request_params) {
  25. return this.doUpdate(lang_id, lang_params, request_params);
  26. }
  27. delete(lang_id, request_params) {
  28. return super.doDelete(lang_id, request_params);
  29. }
  30. }
  31. exports.Languages = Languages;
  32. //# sourceMappingURL=languages.js.map