UNPKG

tipi-services

Version:

Node.js library to access wrapping REST API of tipi backend services

25 lines (18 loc) 606 B
const Service = require('../../../Service'); const Endpoints = require('./Endpoints') class NotesService extends Service { constructor(baseUrl) { super() this.endpoints = Endpoints(baseUrl) } async create(data) { return this.sendRequest({ endpoint: this.endpoints.create, body: data }) } async remove(data) { return this.sendRequest({ endpoint: this.endpoints.remove, body: data }) } async list(query) { return this.sendRequest({ endpoint: this.endpoints.list, query }) } } module.exports = NotesService