Get channel metadata
Fetch channel metadata by ID, @username, or URL.
import { Router } from 'express'import { client } from '../lib.js'const router = Router()router.get('/channel/:id', async (req, res) => { const { id } = req.params const channel = await client!.channel(id) res.json(channel)})export const routes = router{
"id": "string",
"name": "string",
"username": "string",
"subscribers": 0,
"subscribersFmt": "string",
"totalViews": 0,
"totalViewsFmt": "string",
"videoCount": 0,
"country": "string",
"thumbnails": {
"default": {
"url": "string",
"width": 0,
"height": 0
},
"medium": {
"url": "string",
"width": 0,
"height": 0
},
"high": {
"url": "string",
"width": 0,
"height": 0
},
"standard": {
"url": "string",
"width": 0,
"height": 0
},
"maxres": {
"url": "string",
"width": 0,
"height": 0
}
},
"uploadsPlaylistId": "string"
}{
"error": {
"code": 0,
"message": "string",
"details": [
"string"
]
}
}