UNPKG

n8n-nodes-awx

Version:

n8n node to interact with Ansible AWX/Tower with improved type safety

29 lines 950 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ProjectResources = void 0; class ProjectResources { constructor(apiClient) { this.apiClient = apiClient; } async list() { const response = await this.apiClient.get('/api/v2/projects/'); return response.data.results; } async get(id) { const response = await this.apiClient.get(`/api/v2/projects/${id}/`); return response.data; } async create(data) { const response = await this.apiClient.post('/api/v2/projects/', data); return response.data; } async update(id, data) { const response = await this.apiClient.put(`/api/v2/projects/${id}/`, data); return response.data; } async delete(id) { await this.apiClient.delete(`/api/v2/projects/${id}/`); } } exports.ProjectResources = ProjectResources; //# sourceMappingURL=ProjectResources.js.map