# @sergeysova/gatsby-source-simplecast

> Gatsby plugin to load podcast episodes from Simplecast.

Latest version **4.0.2** (published 2020-08-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install @sergeysova/gatsby-source-simplecast
pnpm add @sergeysova/gatsby-source-simplecast
yarn add @sergeysova/gatsby-source-simplecast
bun add @sergeysova/gatsby-source-simplecast
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 4.0.2 |
| Published | 2020-08-03 |
| First published | 2020-05-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 35.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Chance Strickland |
| Maintainers | sergeysova |
| Keywords | gatsby, gatsby-plugin, gatsby-source, simplecast |

## Links

- npm: https://www.npmjs.com/package/@sergeysova/gatsby-source-simplecast
- Repository: https://github.com/sergeysova/gatsby-source-simplecast
- Homepage: https://github.com/sergeysova/gatsby-source-simplecast#readme
- Issues: https://github.com/sergeysova/gatsby-source-simplecast/issues
- npm.io page: https://npm.io/package/@sergeysova/gatsby-source-simplecast

## Dependencies (5)

- [map-obj](https://npm.io/package/map-obj.md) ^4.1.0
- [quick-lru](https://npm.io/package/quick-lru.md) ^4.0.1
- [node-fetch](https://npm.io/package/node-fetch.md) ^2.6.0
- [@babel/runtime](https://npm.io/package/@babel/runtime.md) ^7.7.7
- [gatsby-node-helpers](https://npm.io/package/gatsby-node-helpers.md) ^0.3.0

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 4.0.2 (latest) — 2020-08-03
- 4.0.1 — 2020-05-01
- 4.0.0 — 2020-05-01
- 3.0.1 — 2020-05-01
- 3.0.0 — 2020-05-01
- 2.3.0 — 2020-05-01
- 2.2.0 — 2020-05-01

## README

<p align="center">
  <a href="https://www.gatsbyjs.org">
    <img alt="Gatsby icon" src="https://www.gatsbyjs.org/monogram.svg" height="60" />
  </a>
  <img aria-hidden="true" src="https://res.cloudinary.com/chancedigital/image/upload/c_scale,h_150/v1559751463/hrt.png" alt="heart icon" height="60">
  <a href="https://www.gatsbyjs.org">
    <img alt="Simplecast icon" src="https://svgshare.com/i/Exk.svg" width="60" height="60" />
  </a>
</p>

<h1 align="center">
  gatsby-source-simplecast
</h1>

A Gatsby plugin to load podcast episodes from the [Simplecast API](https://help.simplecast.com/en/articles/2724796-simplecast-2-0-api).

## Installation

[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](http://prettier.io)

```bash
$ npm i @sergeysova/gatsby-source-simplecast
```

OR

```bash
$ yarn add @sergeysova/gatsby-source-simplecast
```

## Usage

In your `gatsby-config.js` file, load in the plugin along with the parameters of which podcast episodes to load:

```javascript
module.exports = {
  plugins: [
    {
      resolve: '@sergeysova/gatsby-source-simplecast',
      options: {
        token: 'abcdefghijklmnopqrstuvwxyz1234567890',
        podcastId: 'abc123de-456f-gh78-90ij-klmn1234opqr',
      },
    },
  ],
};
```

In your page, construct a query to get the data you need from the API.

```js
import React from 'react';
import { graphql } from 'gatsby';
import Img from 'gatsby-image'
import Layout from 'components/Layout';

// Data from the pageQuery below is available as props to your page component!
const PodcastPage = ({
  data: {
    allSimplecastEpisode: { edges: episodes },
  },
}) => {
  return (
    <Layout>
      <h1>My Podcast Episodes</h1>
      <ul>
        {episodes.map(({ node }) => (
          <li key={node.id}>
            <article>
              <h2>
                Episode {node.number}: {node.title}
              </h2>
              <Img fixed={node.image.childImageSharp.fixed} />
              <p>Published {node.publishedAt}</p>
              <hr />
              <p>{node.description}</p>
              <a href={`/podcasts/${node.slug}`}>Listen</a>
              <a href={node.enclosureUrl}>Download</a>
            </article>
          </li>
        ))}
      </ul>
    </Layout>
  );
};

export const pageQuery = graphql`
  query PodcastPageQuery {
    allSimplecastEpisode {
      edges {
        node {
          id
          slug
          enclosureUrl
          number
          publishedAt(formatString: "MMMM D, Y")
          title
          description
          image {
            childImageSharp {
              fixed(width: 300) {
                ...GatsbyImageSharpFixed
              }
            }
          }
        }
      }
    }
  }
`;

export default PodcastPage;
```

### Options API

| Option     | Type                | Description                                                                                                                                    | Default |
| :--------- | :------------------ | :--------------------------------------------------------------------------------------------------------------------------------------------- | :------ |
| token      | `string` (required) | Simplecast API key. See the [Simplecast API documentation](https://help.simplecast.com/en/articles/2724796-simplecast-2-0-api) for details.    |         |
| podcastId  | `string` (required) | The ID of the podcast you want to fetch. The podcast ID can be found in the URL from your Simplecast dashboard under podcast episode settings. |         |
| fetchLimit | `number`            | The maximum number of episodes retrieved.                                                                                                      | `99`    |

---
_Source: https://npm.io/package/@sergeysova/gatsby-source-simplecast · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
