tipi-services
Version:
Node.js library to access wrapping REST API of tipi backend services
21 lines (15 loc) • 499 B
JavaScript
const Service = require('../../../Service')
const Endpoints = require('./Endpoints')
class PropertiesService extends Service {
constructor (baseUrl) {
super()
this.endpoints = Endpoints(baseUrl)
}
async list (query) {
return this.sendRequest({ endpoint: this.endpoints.list, query })
}
async details (number, query) {
return this.sendRequest({ endpoint: this.endpoints.details, params: { number }, query })
}
}
module.exports = PropertiesService