New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

gatsby-source-youtube-playlist

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gatsby-source-youtube-playlist

gatsby plugin to retrieve YouTube playlist data using YouTube channel id and YouTube Data api key

  • 1.0.2
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
6
increased by50%
Maintainers
1
Weekly downloads
 
Created
Source

gatsby-source-youtube-playlist

Gatsby plugin to retrieve YouTube playlist data from a YouTube channel using Channel id & YouTube Data API Key

How to install

    npm install --save gatsby-source-youtube-playlist

This plugin depends upon axios to fetch YouTube playlist data and gatsby-source-filesystem to create remote thumbnail image.

Example

Add in your gatsby-config.js

module.exports = {
  plugins: [
        {
            resolve: `gatsby-source-youtube-playlist`,
            options: {
                apiKey: 'YouTube_Data_API_KEY' ,
                channelId: 'YouTube_Channel_Id',
                maxResults: 20 // default is 5
            },
        },
    ],
}

guide to get YouTube Data API KEY

How to query

{
  allYouTubePlaylistItems {
    edges {
      node {
        channelTitle
        title
        desc
        playlistId
        publishDate
        thumbnails {
          default {
            url
          }
        }
        remoteImage {
          relativePath
          publicURL
        }
      }
    }
  }
}

Schema Descriptions

channelTitle: Title of YouTube Channel

title: Playlist title

desc: Playlist description

playlistId: id of the playlist. It can't be used to fetch all videos from a playlist

publishDate: Playlist publish date

thumbnails: Contains information about thumbnails available on YouTube. It has sub fields default, medium, high, standard and they contain sub properties url,height,width.

remoteImage: It contains information about locally saved thumbnail image such as publicURL, extension, size, name, etc.

Keywords

FAQs

Package last updated on 06 Jan 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc