Files
shields/services/deprecated-service.js
2018-08-27 07:46:06 -04:00

32 lines
573 B
JavaScript

'use strict'
const BaseService = require('./base')
const { Deprecated } = require('./errors')
// Only `url` is required.
function deprecatedService({ url, label, category, examples = [] }) {
return class DeprecatedService extends BaseService {
static get category() {
return category
}
static get url() {
return url
}
static get defaultBadgeData() {
return { label }
}
static get examples() {
return examples
}
async handle() {
throw new Deprecated()
}
}
}
module.exports = deprecatedService