npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

vtmdb

v0.1.4

Published

A more modern library to access the content of TMDb

Downloads

45

Readme

vtmdb

GitHub Actions Codecov NPM Downloads TypeScript ISC License

A more modern package to access the content of TMDb.

🚧 This package is in alpha stage. Use at your own risk! 🚧

⚙️ Installation

In your project root folder, enter the following command in the terminal:

$ yarn add vtmdb

or, if you use NPM:

$ npm install vtmdb

🤖 Usage

Import the class Tmdb in your project and initialize it passing the parameters for the API key and the language that you want to get the results. For example, new Tmdb('pt-BR') will return results in Brazilian Portuguese.

If no language parameter is specified then the default language will be set to English.

Get a show by ID

// Import the package in your script and initialize the Tmdb class
import Tmdb from 'vtmdb'
const tmdb = new Tmdb('apikey')

// Get the details of the show "The Simpsons"
tmdb.getShow('tt0096697')
    .then(console.log)

And the response should be something similar to this:

{
    "identifier": "tt0096697",
    "url": "https://www.Tmdb.com/title/tt0096697",
    "name": "The Simpsons",
    "summary": "The satiric adventures of a working-class family in the misfit city of Springfield.",
    "description": "This is an animated sitcom about the antics of a dysfunctional family. Homer is the oafish unhealthy beer loving father, Marge is the hardworking homemaker wife, Bart is the perpetual ten-year-old underachiever (and proud of it), Lisa is the unappreciated eight-year-old genius, and Maggie is the cute, pacifier loving silent infant.",
    "year": 1989,
    "contentRating": "TV-PG",
    "alternativeName": null,
    "duration": 22,
    "aggregateRating": { "ratingValue": 8.7, "ratingCount": 353617 },
    "genre": [ "Animation", "Comedy" ],
    "image": {
        "small": "https://m.media-amazon.com/images/M/MV5BYjFkMTlkYWUtZWFhNy00M2FmLThiOTYtYTRiYjVlZWYxNmJkXkEyXkFqcGdeQXVyNTAyODkwOQ@@._V1_UX182_CR0,0,182,268_AL_.jpg",
        "big": "https://m.media-amazon.com/images/M/MV5BYjFkMTlkYWUtZWFhNy00M2FmLThiOTYtYTRiYjVlZWYxNmJkXkEyXkFqcGdeQXVyNTAyODkwOQ@@._V1_SY1000_CR0,0,666,1000_AL_.jpg"
    },
    "recommended": [
        { "identifier": "tt0121955", "name": "South Park" },
        { "identifier": "tt0182576", "name": "Family Guy" },
        { "identifier": "tt0149460", "name": "Futurama" },
        { "identifier": "tt0397306", "name": "American Dad!" },
        { "identifier": "tt0462538", "name": "The Simpsons Movie" },
        { "identifier": "tt0412142", "name": "House" },
        { "identifier": "tt2861424", "name": "Rick and Morty" },
        { "identifier": "tt2085059", "name": "Black Mirror" },
        { "identifier": "tt1628033", "name": "Top Gear" },
        { "identifier": "tt0098904", "name": "Seinfeld" },
        { "identifier": "tt3398228", "name": "BoJack Horseman" },
        { "identifier": "tt0367279", "name": "Arrested Development" }
    ]
}

Documentation

For detailed information on how to use this package, please check the API reference for more examples.

📝 License

vtmdb is released under the ISC License. See LICENSE for details.

👨🏾‍💻 Author

Vinicius Egidio (vinicius.io)