1234567891011121314151617181920212223242526272829 |
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
- exports.Comments = void 0;
- const base_collection_1 = require("./base_collection");
- const comment_1 = require("../models/comment");
- class Comments extends base_collection_1.BaseCollection {
- static rootElementName = "comments";
- static rootElementNameSingular = "comment";
- static prefixURI = "projects/{!:project_id}/keys/{!:key_id}/comments/{:id}";
- static elementClass = comment_1.Comment;
- list(request_params) {
- return this.doList(request_params);
- }
- create(comment_params, request_params) {
- const body = { comments: this.objToArray(comment_params) };
- return this.doCreate(body, request_params, this.populateArrayFromJson);
- }
- get(comment_id, request_params) {
- return this.doGet(comment_id, request_params);
- }
- delete(comment_id, request_params) {
- return this.doDelete(comment_id, request_params);
- }
- list_project_comments(params) {
- return this.createPromise("GET", params, this.populateArrayFromJson, this.handleReject, null, "projects/{!:project_id}/comments");
- }
- }
- exports.Comments = Comments;
- //# sourceMappingURL=comments.js.map
|