@sbardian/gatsby-source-amazon-wishlist
v2.1.17
Published
Gatsby source plugin for loading items from an Amazon Wishlist
Downloads
5
Maintainers
Readme
@sbardian/gatsby-source-amazon-wishlist
Loads items from an Amazon Wishlist into Gatsby.js
Fork from Unobvious-Technology.
Installation
npm install @sbardian/gatsby-source-amazon-wishlist
Usage
Edit gatsby-config.js
to use the plugin:
{
...
plugins: [
...
{
resolve: '@sbardian/gatsby-source-amazon-wishlist',
options: {
lists: [
{
owner: 'Brian',
wishlistUrl: 'https://www.amazon.com/hz/wishlist/ls/<wishlist code>',
limit: 25,
},
{
owner: 'Bob',
wishlistUrl: 'https://www.amazon.com/hz/wishlist/ls/<wishlist code>',
}
]
},
},
]
}
Options
lists
: Array of wishlist options<Array>
owner
: Owner of wishlist:<String>
wishlistUrl
: URL to your amazon wishlist, must bepublic
orshared
:<String>
limit
: Whether to stop fetching at a specific limit, defaults tofalse
:<Int>
Querying
You can query the nodes created by the plugin as follows:
StaticQuery
graphql`
{
allAmazonWishlistItem {
edges {
node {
id
owner
title
url
price
features
comment
priority
purchased
requested
image {
url
}
}
}
}
}
`
Page query with filters
graphql`
{
allAmazonWishlistItem(filter: { owner: { eq: "brian" } }) {
edges {
node {
id
owner
title
url
price
features
comment
priority
purchased
requested
image {
url
}
}
}
}
}
`