podcastindexjs
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

PodcastIndexJS

PodcastIndexJS is a client-side javascript library to use the Podcast Index API https://podcastindex.org/. This library was adapted from the Node package https://github.com/RyanHirsch/podcastdx-client, in order for use on the client-side.

To use the Podcast Index API, you must register for a developer API KEY and API SECRET from https://api.podcastindex.org/signup.

Documentation

All available methods/types can be viewed at https://jasonobeid.github.io/PodcastIndexJS/classes/index.PodcastIndexClient.html.

Installation

yarn add podcastindexjs

Usage

import { PodcastIndexClient } from "podcastindexjs";

// assumes you have your key and secret set as environment variables
const client = new PodcastIndexClient(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);

Development

Before running any tests, you would need to add your API KEY and API SECRET to jestSetup.ts

Community

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

Package Sidebar

Install

npm i podcastindexjs

Weekly Downloads

2

Version

1.0.4

License

MIT

Unpacked Size

167 kB

Total Files

46

Last publish

Collaborators

  • jason.obeid