# podcast-index-client

> [![Test](https://github.com/podcastool/podcastdx-client/workflows/Test/badge.svg?branch=master)](https://github.com/podcastool/podcastdx-client/actions/workflows/test.yaml) [![npm version](https://badge.fury.io/js/podcast-index-client.svg)](https://badge

Latest version **6.0.1** (published 2023-08-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install podcast-index-client
pnpm add podcast-index-client
yarn add podcast-index-client
bun add podcast-index-client
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 6.0.1 |
| Published | 2023-08-05 |
| First published | 2023-08-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 389.4 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Maintainers | sinchang |

## Links

- npm: https://www.npmjs.com/package/podcast-index-client
- Repository: https://github.com/podcastool/podcast-index-client
- Homepage: https://github.com/podcastool/podcast-index-client#readme
- Issues: https://github.com/podcastool/podcast-index-client/issues
- npm.io page: https://npm.io/package/podcast-index-client

## Dependencies (5)

- [ajv](https://npm.io/package/ajv.md) ^7.1.1
- [ramda](https://npm.io/package/ramda.md) ^0.27.1
- [dotenv](https://npm.io/package/dotenv.md) ^8.2.0
- [node-fetch](https://npm.io/package/node-fetch.md) ^2.6.1
- [typescript-json-schema](https://npm.io/package/typescript-json-schema.md) ^0.49.0

## Recent versions

- 6.0.1 (latest) — 2023-08-05
- 6.0.0 — 2023-08-03

## README

# Podcast Index Client

[![Test](https://github.com/podcastool/podcastdx-client/workflows/Test/badge.svg?branch=master)](https://github.com/podcastool/podcastdx-client/actions/workflows/test.yaml) 
[![npm version](https://badge.fury.io/js/podcast-index-client.svg)](https://badge.fury.io/js/podcast-index-client)
[![codecov](https://codecov.io/gh/podcastool/podcastdx-client/branch/master/graph/badge.svg?token=BW5JV2GQS1)](https://codecov.io/gh/podcastool/podcastdx-client)

The is a client for interacting with <https://podcastindex.org/>. In order for this to be useful, you need to get a developer `API KEY` and `API SECRET` from <https://api.podcastindex.org>

This includes typescript types as well as JSDoc strings that should make interacting with the API easier.

JSON Schema generated from the types contained in the project can be found at <https://github.com/podcastool/podcastdx-client/tree/master/src/schemas>

## Installation

```sh
npm -i podcast-index-client
```

## Usage

Auto-generated docs are available at <https://podcastool.github.io/podcastdx-client/index.html>

```ts
import PodcastIndexClient from "podcast-index-client";

// assumes you have an your key and secret set as environment variables
const client = new PodcastIndexClient({
  key: process.env.API_KEY,
  secret: process.env.API_SECRET,
});

client.search("javascript").then(console.log);

client.recentFeeds().then(console.log);
client.recentNewFeeds().then(console.log);
client.recentEpisodes().then(console.log);

client.podcastByUrl("https://feeds.theincomparable.com/batmanuniversity").then(console.log);
client.podcastById(75075).then(console.log);
client.podcastByItunesId(1441923632).then(console.log);

client.episodesByFeedUrl("https://feeds.theincomparable.com/batmanuniversity").then(console.log);
client.episodesByFeedId(75075).then(console.log);
client.episodesByItunesId(1441923632).then(console.log);
client.episodeById(16795106).then(console.log);
```

## Releasing a new version

1. Ensure you're fully committed
   1. Make sure tests are green schema is correct `yarn tsc && yarn test && yarn validate`
2. Run `yarn publish`

## Community

Join on Discord at <https://discord.gg/d6apPvR3N6> or on <https://podcastindex.social/>

---
_Source: https://npm.io/package/podcast-index-client · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
