Socket
Book a DemoInstallSign in
Socket

@eligundry/gatsby-source-goodreads

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@eligundry/gatsby-source-goodreads

Gatsby source the provides user shelves from GoodReads

1.0.4
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

@eligundry/gatsby-source-goodreads

Gatsby source that provides Goodreads shelf information.

Why Use This?

There are many Gatsby Goodreads sources, why make another? It was fun AND all the sources I'm seeing are using the Goodreads API which is due to be deprecated soon. This plugin scrapes for the publically accessible HTML available on their website. Also, no need to fiddle with API keys to pull the data!

Installation

$ npm install -S @eligundry/gatsby-source-goodreads

Usage

In gatsby-config.js:

module.exports = {
  plugins: [
    {
      resolve: '@eligundry/gatsby-source-goodreads',
      options: {
        userID: 123,
        shelves: ['currently-reading', 'read'],
      }
    }
  ]
}

Then, you can query it like so (this is what I'm using on my site):

query UseGoodreadsShelves {
  currentlyReading: allGoodreadsBook(
    filter: { shelf: { eq: "currently-reading" } }
    sort: { fields: started, order: DESC }
    limit: 6
  ) {
    books: nodes {
      title
      author
      isbn
      url
      started
      coverImage {
        childImageSharp {
          gatsbyImageData(width: 175, quality: 90)
        }
      }
    }
  }
  recentlyFinished: allGoodreadsBook(
    filter: { shelf: { eq: "read" } }
    sort: { fields: finished, order: DESC }
    limit: 6
  ) {
    books: nodes {
      finished
      title
      author
      isbn
      url
      started
      coverImage {
        childImageSharp {
          gatsbyImageData(width: 175, quality: 90)
        }
      }
    }
  }
}

Keywords

gatsby

FAQs

Package last updated on 18 Feb 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.