Refactor jira,jitpack,jsdelivr,keybase service files (#5581)

This commit is contained in:
Thakur Karthik
2020-09-20 21:14:47 +05:30
committed by GitHub
parent fc91038652
commit 4c34b14b4a
9 changed files with 163 additions and 231 deletions

View File

@@ -29,31 +29,25 @@ const bitcoinAddressSchema = Joi.object({
}).required()
module.exports = class KeybaseBTC extends KeybaseProfile {
static get route() {
return {
base: 'keybase/btc',
pattern: ':username',
}
static route = {
base: 'keybase/btc',
pattern: ':username',
}
static get examples() {
return [
{
title: 'Keybase BTC',
namedParams: { username: 'skyplabs' },
staticPreview: this.render({
address: '12ufRLmbEmgjsdGzhUUFY4pcfiQZyRPV9J',
}),
keywords: ['bitcoin'],
},
]
}
static examples = [
{
title: 'Keybase BTC',
namedParams: { username: 'skyplabs' },
staticPreview: this.render({
address: '12ufRLmbEmgjsdGzhUUFY4pcfiQZyRPV9J',
}),
keywords: ['bitcoin'],
},
]
static get defaultBadgeData() {
return {
label: 'btc',
color: 'informational',
}
static defaultBadgeData = {
label: 'btc',
color: 'informational',
}
static render({ address }) {
@@ -62,9 +56,7 @@ module.exports = class KeybaseBTC extends KeybaseProfile {
}
}
static get apiVersion() {
return '1.0'
}
static apiVersion = '1.0'
async handle({ username }) {
const options = {

View File

@@ -25,28 +25,22 @@ const keyFingerprintSchema = Joi.object({
}).required()
module.exports = class KeybasePGP extends KeybaseProfile {
static get route() {
return {
base: 'keybase/pgp',
pattern: ':username',
}
static route = {
base: 'keybase/pgp',
pattern: ':username',
}
static get examples() {
return [
{
title: 'Keybase PGP',
namedParams: { username: 'skyplabs' },
staticPreview: this.render({ fingerprint: '1863145FD39EE07E' }),
},
]
}
static examples = [
{
title: 'Keybase PGP',
namedParams: { username: 'skyplabs' },
staticPreview: this.render({ fingerprint: '1863145FD39EE07E' }),
},
]
static get defaultBadgeData() {
return {
label: 'pgp',
color: 'informational',
}
static defaultBadgeData = {
label: 'pgp',
color: 'informational',
}
static render({ fingerprint }) {
@@ -55,9 +49,7 @@ module.exports = class KeybasePGP extends KeybaseProfile {
}
}
static get apiVersion() {
return '1.0'
}
static apiVersion = '1.0'
async handle({ username }) {
const options = {

View File

@@ -27,31 +27,25 @@ const stellarAddressSchema = Joi.object({
}).required()
module.exports = class KeybaseXLM extends KeybaseProfile {
static get route() {
return {
base: 'keybase/xlm',
pattern: ':username',
}
static route = {
base: 'keybase/xlm',
pattern: ':username',
}
static get examples() {
return [
{
title: 'Keybase XLM',
namedParams: { username: 'skyplabs' },
staticPreview: this.render({
address: 'GCGH37DYONEBPGAZGCHJEZZF3J2Q3EFYZBQBE6UJL5QKTULCMEA6MXLA',
}),
keywords: ['stellar'],
},
]
}
static examples = [
{
title: 'Keybase XLM',
namedParams: { username: 'skyplabs' },
staticPreview: this.render({
address: 'GCGH37DYONEBPGAZGCHJEZZF3J2Q3EFYZBQBE6UJL5QKTULCMEA6MXLA',
}),
keywords: ['stellar'],
},
]
static get defaultBadgeData() {
return {
label: 'xlm',
color: 'informational',
}
static defaultBadgeData = {
label: 'xlm',
color: 'informational',
}
static render({ address }) {
@@ -60,9 +54,7 @@ module.exports = class KeybaseXLM extends KeybaseProfile {
}
}
static get apiVersion() {
return '1.0'
}
static apiVersion = '1.0'
async handle({ username }) {
const options = {

View File

@@ -29,31 +29,25 @@ const zcachAddressSchema = Joi.object({
}).required()
module.exports = class KeybaseZEC extends KeybaseProfile {
static get route() {
return {
base: 'keybase/zec',
pattern: ':username',
}
static route = {
base: 'keybase/zec',
pattern: ':username',
}
static get examples() {
return [
{
title: 'Keybase ZEC',
namedParams: { username: 'skyplabs' },
staticPreview: this.render({
address: 't1RJDxpBcsgqAotqhepkhLFMv2XpMfvnf1y',
}),
keywords: ['zcash'],
},
]
}
static examples = [
{
title: 'Keybase ZEC',
namedParams: { username: 'skyplabs' },
staticPreview: this.render({
address: 't1RJDxpBcsgqAotqhepkhLFMv2XpMfvnf1y',
}),
keywords: ['zcash'],
},
]
static get defaultBadgeData() {
return {
label: 'zec',
color: 'informational',
}
static defaultBadgeData = {
label: 'zec',
color: 'informational',
}
static render({ address }) {
@@ -62,9 +56,7 @@ module.exports = class KeybaseZEC extends KeybaseProfile {
}
}
static get apiVersion() {
return '1.0'
}
static apiVersion = '1.0'
async handle({ username }) {
const options = {