import { Base } from '../base' ; import { Comment } from './types' ; const resourceName = 'comments' ; export class Comments extends Base { getComment ( commentId ) { return this . request < Comment > ( `${ resourceName }/${ commentId }` ) ; } getComments ( articleId ) { return this . request < Comment [ ] > ( `${ resourceName }?a_id=${ articleId }` ) ; } }