Access OMDb's API for getting details about movies and TV shows with Deno.
This repository has been archived on 2026-09-09. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
  • TypeScript 100%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Tim Hårek Andreassen 19ad765f93
fix: Make schema work better with "N/A"
Signed-off-by: Tim Hårek Andreassen <tim@harek.no>
2024-06-15 23:30:24 +02:00
src fix: Make schema work better with "N/A" 2024-06-15 23:30:24 +02:00
.build.yml ci: Cleaner way to check for new release tag 2024-06-04 14:16:06 +02:00
deno.json fix: Make schema work better with "N/A" 2024-06-15 23:30:24 +02:00
deno.lock refactor: Use JSR modules instead of /x 2024-05-15 21:38:02 +02:00
deps.ts refactor: Use JSR modules instead of /x 2024-05-15 21:38:02 +02:00
LICENSE.md Fix License (#2) 2022-06-29 22:10:50 +02:00
mod.ts chore: Update docs and CLI details 2024-04-15 21:09:59 +02:00
README.md refactor: Use JSR modules instead of /x 2024-05-15 21:38:02 +02:00

JSR sourcehut GitHub mirror

deno-omdb

Access OMDb's API for getting details about movies and TV shows.

Usage

Remember to set OMDB_API enviroment variable.

// your_script.ts
import { getTitle } from "jsr:@timharek/omdb";

const result = await getTitle({ titleOrId: "Spider-Man" });

CLI

Installation

deno install --allow-net=www.omdbapi.com --allow-env=OMDB_API \
  -n omdb jsr:@timharek/omdb/cli

Usage

# Using name
omdb --api <api_key> 'Spider-Man Far from home'
# Using IMDb id
omdb --api <api_key> tt6320628
# Another way to specify the API key
OMDB_API=<api_key> omdb 'Spider-Man'
# Using name and getting JSON output
omdb --api <api_key> --json 'Spider-Man Far from home'

See omdb -h for all available flags and commands.