* migrate some services from examples to openApi * Use testResultOpenApiQueryParams instead of redefining queryParams
27 lines
637 B
JavaScript
27 lines
637 B
JavaScript
import { pathParams } from '../index.js'
|
|
import { description, YouTubeVideoBase } from './youtube-base.js'
|
|
|
|
export default class YouTubeComments extends YouTubeVideoBase {
|
|
static route = {
|
|
base: 'youtube/comments',
|
|
pattern: ':videoId',
|
|
}
|
|
|
|
static openApi = {
|
|
'/youtube/comments/{videoId}': {
|
|
get: {
|
|
summary: 'YouTube Video Comments',
|
|
description,
|
|
parameters: pathParams({
|
|
name: 'videoId',
|
|
example: 'wGJHwc5ksMA',
|
|
}),
|
|
},
|
|
},
|
|
}
|
|
|
|
static render({ statistics, id }) {
|
|
return super.renderSingleStat({ statistics, statisticName: 'comment', id })
|
|
}
|
|
}
|