https://github.com/timharek/deno-omdb
Access OMDb's API with Deno.
https://github.com/timharek/deno-omdb
api cli deno deno-cli imdb omdb-api typescript
Last synced: about 2 months ago
JSON representation
Access OMDb's API with Deno.
- Host: GitHub
- URL: https://github.com/timharek/deno-omdb
- Owner: timharek
- License: gpl-3.0
- Created: 2022-06-23T17:42:37.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-06-15T21:31:05.000Z (about 2 years ago)
- Last Synced: 2025-02-18T06:46:56.990Z (over 1 year ago)
- Topics: api, cli, deno, deno-cli, imdb, omdb-api, typescript
- Language: TypeScript
- Homepage:
- Size: 91.8 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
[](https://jsr.io/@timharek/omdb)
[](https://sr.ht/~timharek/deno-omdb)
[](https://github.com/timharek/deno-omdb)
# deno-omdb
Access [OMDb's API](https://omdbapi.com/) for getting details about movies and
TV shows.
## Usage
Remember to set `OMDB_API` enviroment variable.
```ts
// your_script.ts
import { getTitle } from "jsr:@timharek/omdb";
const result = await getTitle({ titleOrId: "Spider-Man" });
```
## CLI
### Installation
```sh
deno install --allow-net=www.omdbapi.com --allow-env=OMDB_API \
-n omdb jsr:@timharek/omdb/cli
```
### Usage
```bash
# Using name
omdb --api 'Spider-Man Far from home'
# Using IMDb id
omdb --api tt6320628
# Another way to specify the API key
OMDB_API= omdb 'Spider-Man'
# Using name and getting JSON output
omdb --api --json 'Spider-Man Far from home'
```
See `omdb -h` for all available flags and commands.