Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 7 days 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 (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-15T21:31:05.000Z (7 months ago)
- Last Synced: 2024-12-20T22:09:22.336Z (13 days 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
[![JSR](https://jsr.io/badges/@timharek/omdb)](https://jsr.io/@timharek/omdb)
[![sourcehut](https://img.shields.io/badge/repository-sourcehut-lightgrey.svg?logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSINCiAgICB3aWR0aD0iMTI4IiBoZWlnaHQ9IjEyOCI+DQogIDxkZWZzPg0KICAgIDxmaWx0ZXIgaWQ9InNoYWRvdyIgeD0iLTEwJSIgeT0iLTEwJSIgd2lkdGg9IjEyNSUiIGhlaWdodD0iMTI1JSI+DQogICAgICA8ZmVEcm9wU2hhZG93IGR4PSIwIiBkeT0iMCIgc3RkRGV2aWF0aW9uPSIxLjUiDQogICAgICAgIGZsb29kLWNvbG9yPSJibGFjayIgLz4NCiAgICA8L2ZpbHRlcj4NCiAgICA8ZmlsdGVyIGlkPSJ0ZXh0LXNoYWRvdyIgeD0iLTEwJSIgeT0iLTEwJSIgd2lkdGg9IjEyNSUiIGhlaWdodD0iMTI1JSI+DQogICAgICA8ZmVEcm9wU2hhZG93IGR4PSIwIiBkeT0iMCIgc3RkRGV2aWF0aW9uPSIxLjUiDQogICAgICAgIGZsb29kLWNvbG9yPSIjQUFBIiAvPg0KICAgIDwvZmlsdGVyPg0KICA8L2RlZnM+DQogIDxjaXJjbGUgY3g9IjUwJSIgY3k9IjUwJSIgcj0iMzglIiBzdHJva2U9IndoaXRlIiBzdHJva2Utd2lkdGg9IjQlIg0KICAgIGZpbGw9Im5vbmUiIGZpbHRlcj0idXJsKCNzaGFkb3cpIiAvPg0KICA8Y2lyY2xlIGN4PSI1MCUiIGN5PSI1MCUiIHI9IjM4JSIgc3Ryb2tlPSJ3aGl0ZSIgc3Ryb2tlLXdpZHRoPSI0JSINCiAgICBmaWxsPSJub25lIiBmaWx0ZXI9InVybCgjc2hhZG93KSIgLz4NCjwvc3ZnPg0KCg==)](https://sr.ht/~timharek/deno-omdb)
[![GitHub mirror](https://img.shields.io/badge/mirror-GitHub-black.svg?logo=github)](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.