2.0.0 • Published 5 years ago

simplecast-api-client v2.0.0

Weekly downloads
153
License
MIT
Repository
-
Last release
5 years ago

Simplecast JS Client

Getting Started

The client library is now supporting the v2 of the SimpleCast API! 🎉🎊

I encourge you to checkout the v2 documentation before start using this API. There some killer breaking changes on how it works.

npm install and npm test.

Using the Client

Install the package using npm.

npm i simplecast-api-client --save

Then simple get your api key and paste the following code.

const client = new SimpleCastClient({ apikey: "MY API KEY" });
client.podcasts
  .getPodcasts()
  .then(podcasts => {
    console.log(
      `# of Podcasts: ${podcasts.collection.length}.
      Getting the episodes of ${podcasts.collection[0].title} (${
        podcasts.collection[0].id
      })`
    );
    podcastId = podcasts.collection[0].id;
    return client.episodes.getEpisodes(podcastId, { limit: 1000 });
  })
  .then(episodes => {
    console.log(`# of episodes: ${episodes.collection.length}
    Getting the stats for episode ${episodes.collection[3].title}`);
    return client.episodes.getDownloads(episodes.collection[3].id);
  })
  .then(downloads => {
    console.log(`Total downloads: ${downloads.total}`);
  })
  .catch(error => {
    console.log({ response: error.message });
  });

More documentation to come.

2.0.0

5 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago