Unify order of more services (#3358)

Ref #3353
This commit is contained in:
Paul Melnikow
2019-04-24 15:08:26 -04:00
committed by GitHub
parent 1dd8d1329c
commit f8aeb56129
76 changed files with 1298 additions and 1308 deletions

View File

@@ -29,10 +29,6 @@ const bitcoinAddressSchema = Joi.object({
}).required()
module.exports = class KeybaseBTC extends KeybaseProfile {
static get apiVersion() {
return '1.0'
}
static get route() {
return {
base: 'keybase/btc',
@@ -40,6 +36,19 @@ module.exports = class KeybaseBTC extends KeybaseProfile {
}
}
static get examples() {
return [
{
title: 'Keybase BTC',
namedParams: { username: 'skyplabs' },
staticPreview: this.render({
address: '12ufRLmbEmgjsdGzhUUFY4pcfiQZyRPV9J',
}),
keywords: ['bitcoin'],
},
]
}
static get defaultBadgeData() {
return {
label: 'btc',
@@ -47,6 +56,16 @@ module.exports = class KeybaseBTC extends KeybaseProfile {
}
}
static render({ address }) {
return {
message: address,
}
}
static get apiVersion() {
return '1.0'
}
async handle({ username }) {
const options = {
form: {
@@ -72,23 +91,4 @@ module.exports = class KeybaseBTC extends KeybaseProfile {
return this.constructor.render({ address: bitcoinAddresses[0].address })
}
static render({ address }) {
return {
message: address,
}
}
static get examples() {
return [
{
title: 'Keybase BTC',
namedParams: { username: 'skyplabs' },
staticPreview: this.render({
address: '12ufRLmbEmgjsdGzhUUFY4pcfiQZyRPV9J',
}),
keywords: ['bitcoin'],
},
]
}
}

View File

@@ -27,10 +27,6 @@ const keyFingerprintSchema = Joi.object({
}).required()
module.exports = class KeybasePGP extends KeybaseProfile {
static get apiVersion() {
return '1.0'
}
static get route() {
return {
base: 'keybase/pgp',
@@ -38,6 +34,16 @@ module.exports = class KeybasePGP extends KeybaseProfile {
}
}
static get examples() {
return [
{
title: 'Keybase PGP',
namedParams: { username: 'skyplabs' },
staticPreview: this.render({ fingerprint: '1863145FD39EE07E' }),
},
]
}
static get defaultBadgeData() {
return {
label: 'pgp',
@@ -45,6 +51,16 @@ module.exports = class KeybasePGP extends KeybaseProfile {
}
}
static render({ fingerprint }) {
return {
message: fingerprint.slice(-16).toUpperCase(),
}
}
static get apiVersion() {
return '1.0'
}
async handle({ username }) {
const options = {
form: {
@@ -70,20 +86,4 @@ module.exports = class KeybasePGP extends KeybaseProfile {
return this.constructor.render({ fingerprint: primaryKey.key_fingerprint })
}
static render({ fingerprint }) {
return {
message: fingerprint.slice(-16).toUpperCase(),
}
}
static get examples() {
return [
{
title: 'Keybase PGP',
namedParams: { username: 'skyplabs' },
staticPreview: this.render({ fingerprint: '1863145FD39EE07E' }),
},
]
}
}

View File

@@ -27,10 +27,6 @@ const stellarAddressSchema = Joi.object({
}).required()
module.exports = class KeybaseXLM extends KeybaseProfile {
static get apiVersion() {
return '1.0'
}
static get route() {
return {
base: 'keybase/xlm',
@@ -38,6 +34,19 @@ module.exports = class KeybaseXLM extends KeybaseProfile {
}
}
static get examples() {
return [
{
title: 'Keybase XLM',
namedParams: { username: 'skyplabs' },
staticPreview: this.render({
address: 'GCGH37DYONEBPGAZGCHJEZZF3J2Q3EFYZBQBE6UJL5QKTULCMEA6MXLA',
}),
keywords: ['stellar'],
},
]
}
static get defaultBadgeData() {
return {
label: 'xlm',
@@ -45,6 +54,16 @@ module.exports = class KeybaseXLM extends KeybaseProfile {
}
}
static render({ address }) {
return {
message: address,
}
}
static get apiVersion() {
return '1.0'
}
async handle({ username }) {
const options = {
form: {
@@ -70,23 +89,4 @@ module.exports = class KeybaseXLM extends KeybaseProfile {
return this.constructor.render({ address: accountId })
}
static render({ address }) {
return {
message: address,
}
}
static get examples() {
return [
{
title: 'Keybase XLM',
namedParams: { username: 'skyplabs' },
staticPreview: this.render({
address: 'GCGH37DYONEBPGAZGCHJEZZF3J2Q3EFYZBQBE6UJL5QKTULCMEA6MXLA',
}),
keywords: ['stellar'],
},
]
}
}

View File

@@ -29,10 +29,6 @@ const zcachAddressSchema = Joi.object({
}).required()
module.exports = class KeybaseZEC extends KeybaseProfile {
static get apiVersion() {
return '1.0'
}
static get route() {
return {
base: 'keybase/zec',
@@ -40,6 +36,19 @@ module.exports = class KeybaseZEC extends KeybaseProfile {
}
}
static get examples() {
return [
{
title: 'Keybase ZEC',
namedParams: { username: 'skyplabs' },
staticPreview: this.render({
address: 't1RJDxpBcsgqAotqhepkhLFMv2XpMfvnf1y',
}),
keywords: ['zcash'],
},
]
}
static get defaultBadgeData() {
return {
label: 'zec',
@@ -47,6 +56,16 @@ module.exports = class KeybaseZEC extends KeybaseProfile {
}
}
static render({ address }) {
return {
message: address,
}
}
static get apiVersion() {
return '1.0'
}
async handle({ username }) {
const options = {
form: {
@@ -72,23 +91,4 @@ module.exports = class KeybaseZEC extends KeybaseProfile {
return this.constructor.render({ address: zcashAddresses[0].address })
}
static render({ address }) {
return {
message: address,
}
}
static get examples() {
return [
{
title: 'Keybase ZEC',
namedParams: { username: 'skyplabs' },
staticPreview: this.render({
address: 't1RJDxpBcsgqAotqhepkhLFMv2XpMfvnf1y',
}),
keywords: ['zcash'],
},
]
}
}