<commit_before>const express        = require('express')
const google         = require('googleapis')
const router         = express.Router()
const youtube        = google.youtube('v3')
const defaultConfig  = require('../config')

router.get('/', (req, res) => {
  const vids = []

  const config = Object.assign({
    part: 'snippet',
    maxResults: 50,
    type: 'playlist'
  }, defaultConfig)

  youtube.search.list(config, (err, videos) => {
    videos.items.map((video) => {
      vids.push({
        title: video.snippet.title,
        id: video.id.playlistId,
        description: video.snippet.description,
        thumbnail: video.snippet.thumbnails.high.url
      })
    })

    res.render('playlists', {
      title: 'Nodecasts',
      videos: vids
    })
  })
})

module.exports = router<commit_msg>use the correct api endpoint<commit_after>const express        = require('express')
const google         = require('googleapis')
const router         = express.Router()
const youtube        = google.youtube('v3')
const defaultConfig  = require('../config')

router.get('/', (req, res) => {
  const vids = []

  const config = Object.assign({
    part: 'snippet',
    maxResults: 50
  }, defaultConfig)

  youtube.playlists.list(config, (err, videos) => {
    videos.items.map((video) => {
      vids.push({
        title: video.snippet.title,
        id: video.id.playlistId,
        description: video.snippet.description,
        thumbnail: video.snippet.thumbnails.high.url
      })
    })

    res.render('playlists', {
      title: 'Nodecasts',
      videos: vids
    })
  })
})

module.exports = router
{'fraction_non_alphanumeric': 0.14938271604938272, 'fraction_numerical': 0.003703703703703704, 'mean_word_length': 2.5942350332594235, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5282759', 'n_tokens_mistral': 515, 'n_tokens_neox': 496, 'n_words': 101}