Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
gatsby-source-trakt-tmdb
Advanced tools
Gatsby source plugin for using data from Trakt.TV combined with TMDB on your website
Readme
This source plugin for Gatsby fetches personal statistics from Trakt.tv and optionally enhances them with metadata from TMDB. This can be used to display a list of watched movies and series with their respective posters.
gatsby-source-trakt-tmdb is compatible with gatsby-image so you can easily optimize posters and backdrop images during build time.
query {
allTraktWatchedMovie(
limit: 6
sort: { fields: last_watched_at, order: DESC }
) {
edges {
node {
last_watched_at
movie {
ids {
slug
}
}
tmdb_metadata {
title
poster {
localFile {
childImageSharp {
fluid(maxWidth: 300, maxHeight: 450, quality: 90) {
...GatsbyImageSharpFluid_withWebp
}
}
}
}
}
}
}
}
}
If a Trakt.tv movie or show doesn't have a TMDb id yet, which could be the case
when a show or movie is new, tmdb_metadata
will be null
, so make sure to
check it before using it.
To use this plugin, you have to obtain API keys for Trakt.tv and TMDB:
{
resolve: `gatsby-source-trakt-tmdb`,
options: {
traktApiKey: "TRAKT_API_KEY",
username: "YOUR_TRAKT_USERNAME",
tmdbApiKey: "TMDB_API_KEY", // optional, to fetch metadata
language: "en-US" // optional, language for metadata (e.g. titles)
limit: 10 // optional, number of items to fetch per category
},
},
Try to keep the limit below or at 10 items per category (40 items in total) to avoid rate-limits by TMDb. Limit can also be an object providing individual limits for each Trakt category:
{
limit: {
watchedMovies: 6,
watchedShows: 6,
watchlistMovies: 6,
watchlistShows: 6,
},
}
As this is my first source plugin for Gatsby, I think it has room for improvement. If you're interested in contributing, please feel free to open a pull request.
FAQs
Gatsby source plugin for using data from Trakt.TV combined with TMDB on your website
The npm package gatsby-source-trakt-tmdb receives a total of 1 weekly downloads. As such, gatsby-source-trakt-tmdb popularity was classified as not popular.
We found that gatsby-source-trakt-tmdb demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.