Giter Site home page Giter Site logo

tmdb-sdk's Introduction

TMDB SDK

Deno-first TypeScript library for interacting with themoviedb.org's (TMDB) API.

This library transforms fetched data to make it more idiomatic for JavaScript/TypeScript.

  • Replaces snake_case properties with camelCase
  • Renames properties where appropriate
  • Properties which would sometimes have null or empty string values ("") now use optional values instead

Table of Contents

Error Handling

The API returns 200, 401, and 404 responses. The SDK throws an Error when a 401 or 404 response is received. The full Response will be assigned to Error.cause, and Error.message will be either a specific status message returned by the API if present, or the value of Response.statusText otherwise.

Additionally the standard fetch function used internally throws a TypeError when a network issue is encountered.

API v3

https://developers.themoviedb.org/3/getting-started/introduction

Countries

Source:

import { COUNTRIES, getCountries } from "path/to/v3/countries/mod.ts";
import type {
  Country,
  CountryCode,
  CountryMap,
} from "path/to/v3/countries/mod.ts";

Genres

Source:

import { getMovieGenres, MOVIE_GENRES } from "path/to/v3/genres/mod.ts";
import type { GenreMap, MovieGenre } from "path/to/v3/genres/mod.ts";

Languages

Source:

import { getLanguages, LANGUAGES } from "path/to/v3/languages/mod.ts";
import type {
  Language,
  LanguageCode,
  LanguageMap,
} from "path/to/v3/languages/mod.ts";

Movies

Search

Source:

import { searchMovies } from "path/to/v3/movies/mod.ts";
import type {
  MovieSearchResult,
  SearchMoviesOptions,
  SearchResultsPage,
} from "path/to/v3/languages/mod.ts";

Roadmap

  • Current Version: 0.1.0
  • Completed: 4
  • Slated: 145
Release Category Function
- - -
Account getAccount()
Account getLists()
Account getFavoriteMovies()
Account getFavoriteTVShows()
Account markAsFavorite()
Account getRatedMovies()
Account getRatedTVShows()
Account getRatedTVEpisodes()
Account getMovieWatchlist()
Account getTVShowWatchlist()
Account addToWatchList()
- - -
Authentication createGuestSession()
Authentication createRequestToken()
Authentication createSession()
Authentication validateRequestToken()
Authentication deleteSession()
- - -
Certifications getAllMovieCerts()
Certifications getAllTVCerts()
- - -
Changes getMovieChanges()
Changes getTVChanges()
Changes getPersonChanges()
- - -
Collections getCollectionDetails()
Collections getCollectionImages()
Collections getCollectionTranslations()
- - -
Companies getCompanies()
Companies getAltCompanyNames()
Companies getCompanyImages()
- - -
Configuration getConfiguration()
v0.1.0 Configuration getCountries()
Configuration getJobs()
v0.1.0 Configuration getLanguages()
Configuration getPrimaryTranslations()
Configuration getTimezones()
- - -
Credits getCredits()
- - -
Discover discoverMovies()
Discover discoverTV()
- - -
Find find()
- - -
v0.1.0 Genres getMovieGenres()
Genres getTVGenres()
- - -
GuestSessions getRatedMovies()
GuestSessions getRatedTVShows()
GuestSessions getRatedTVEpisodes()
- - -
Keywords getKeywords()
Keywords getMoviesByKeyword()
- - -
Lists getList()
Lists checkListItemStatus()
Lists createList()
Lists addMovieToList()
Lists removeMovieFromList()
Lists clearList()
Lists deleteList()
- - -
Movies getMovie()
Movies getMovieAccountStates()
Movies getAltMovieTitles()
Movies getMovieChanges()
Movies getMovieCredits()
Movies getMovieExternalIDs()
Movies getMovieImages()
Movies getMovieKeywords()
Movies getMovieLists()
Movies getRecsFromMovie()
Movies getMovieReleaseDates()
Movies getMovieReviews()
Movies getSimilarMovies()
Movies getMovieTranslations()
Movies getMovieVideos()
Movies getMovieWatchProviders()
Movies rateMovie()
Movies deleteMovieRating()
Movies getLatestMovie()
Movies getMoviesInTheaters()
Movies getPopularMovies()
Movies getTopRatedMovies()
Movies getUpcomingMovies()
- - -
Networks getNetworks()
Networks getAltNetworkNames()
Networks getNetworkImages()
- - -
Trending getTrending()
- - -
People getPerson()
People getPersonChanges()
People getPersonMovieCredits()
People getPersonTVCredits()
People getPersonCredits()
People getPersonExternalIDs()
People getPersonImages()
People getPersonTaggedImages()
People getPersonTranslations()
People getLatestPerson()
People getPopularPeople()
- - -
Reviews getReview()
- - -
Search searchCompanies()
Search searchCollections()
Search searchKeywords()
v0.1.0 Search searchMovies()
Search search()
Search searchPeople()
Search searchTVShows()
- - -
TV getTVShow()
TV getTVShowAccountStates()
TV getTVShowAggregateCredits()
TV getAltTVShowTitles()
TV getTVShowChanges()
TV getTVShowCerts()
TV getTVShowCredits()
TV getTVShowEpisodeGroups()
TV getTVShowExternalIDs()
TV getTVShowImages()
TV getTVShowKeywords()
TV getRecsFromTVShow()
TV getTVShowReviews()
TV getTVShowScreened()
TV getSimilarTVShows()
TV getTVShowTranslations()
TV getTVShowVideos()
TV getTVShowWatchProviders()
TV rateTVShow()
TV deleteTVShowRating()
TV getLatestTVShow()
TV getTVAiringToday()
TV getTVOnTheAir()
TV getPopularTVShows()
TV getTopRatedTVShows()
- - -
TV Seasons getTVSeason()
TV Seasons getTVSeasonRatings()
TV Seasons getTVSeasonAggregateCredits()
TV Seasons getTVSeasonChanges()
TV Seasons getTVSeasonCredits()
TV Seasons getTVSeasonExternalIDs()
TV Seasons getTVSeasonImages()
TV Seasons getTVSeasonTranslations()
TV Seasons getTVSeasonVideos()
- - -
TV Episodes getTVEpisodes()
TV Episodes getTVEpisodeRating()
TV Episodes getTVEpisodeChanges()
TV Episodes getTVEpisodeCredits()
TV Episodes getTVEpisodeExternalIDs()
TV Episodes getTVEpisodeImages()
TV Episodes getTVEpisodeTranslations()
TV Episodes rateTVEpisode()
TV Episodes deleteTVEpisodeRating()
TV Episodes getTVEpisodeVideos()
- - -
TV Ep. Groups getEpisodeGroup()
- - -
Watch Providers getWatchProviderRegions()
Watch Providers getWatchProviderRegions()
Watch Providers getTVWatchProviders()

tmdb-sdk's People

Contributors

pskfyi avatar

Stargazers

Andrea Brandi avatar Noah H. Smith avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.