Files
shields/services/youtube/youtube-comments.service.js
Pierre-Yves Bigourdan 66af65c9e2 migrate examples to openApi part 32; affects [azuredevops youtube] (#9861)
* migrate some services from examples to openApi

* Use testResultOpenApiQueryParams instead of redefining queryParams
2023-12-31 16:46:01 +00:00

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 })
}
}