Unify order of another handful of services (#3356)

Ref #3353
This commit is contained in:
Paul Melnikow
2019-04-24 15:03:23 -04:00
committed by GitHub
parent 36f50f2a02
commit 1dd8d1329c
29 changed files with 452 additions and 446 deletions

View File

@@ -32,22 +32,10 @@ const intervalMap = {
}
module.exports = class Sourceforge extends BaseJsonService {
static render({ downloads, interval }) {
return {
label: 'downloads',
message: `${metric(downloads)}${intervalMap[interval].suffix}`,
color: downloadCount(downloads),
}
}
static get category() {
return 'downloads'
}
static get defaultBadgeData() {
return { label: 'sourceforge' }
}
static get route() {
return {
base: 'sourceforge',
@@ -85,6 +73,18 @@ module.exports = class Sourceforge extends BaseJsonService {
]
}
static get defaultBadgeData() {
return { label: 'sourceforge' }
}
static render({ downloads, interval }) {
return {
label: 'downloads',
message: `${metric(downloads)}${intervalMap[interval].suffix}`,
color: downloadCount(downloads),
}
}
async fetch({ interval, project, folder }) {
const url = `http://sourceforge.net/projects/${project}/files/${
folder ? `${folder}/` : ''