tipi-services
Version:
Node.js library to access wrapping REST API of tipi backend services
21 lines (15 loc) • 488 B
JavaScript
const Service = require('../../../Service')
const Endpoints = require('./Endpoints')
class SpacesService extends Service {
constructor (baseUrl) {
super()
this.endpoints = Endpoints(baseUrl)
}
async listAll (ownerId) {
return this.sendRequest({ endpoint: this.endpoints.listAll, query: { ownerId } })
}
async syncSpaces (data) {
return this.sendRequest({ endpoint: this.endpoints.sync, body: data })
}
}
module.exports = SpacesService