Move github examples into services/github (#2309)
This commit is contained in:
@@ -7,10 +7,32 @@ const {
|
||||
makeLogo: getLogo,
|
||||
} = require('../../lib/badge-data')
|
||||
const {
|
||||
documentation,
|
||||
checkErrorResponse: githubCheckErrorResponse,
|
||||
} = require('./github-helpers')
|
||||
|
||||
module.exports = class GithubSize extends LegacyService {
|
||||
static get category() {
|
||||
return 'size'
|
||||
}
|
||||
|
||||
static get route() {
|
||||
return {
|
||||
base: 'github/size',
|
||||
}
|
||||
}
|
||||
|
||||
static get examples() {
|
||||
return [
|
||||
{
|
||||
title: 'GitHub repo size in bytes',
|
||||
previewUrl: 'webcaetano/craft/build/phaser-craft.min.js',
|
||||
keywords: ['GitHub', 'file', 'size'],
|
||||
documentation,
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
static registerLegacyRouteHandler({ camp, cache, githubApiProvider }) {
|
||||
camp.route(
|
||||
/^\/github\/size\/([^/]+)\/([^/]+)\/(.*)\.(svg|png|gif|jpg|json)$/,
|
||||
|
||||
Reference in New Issue
Block a user