Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
gatsby-source-pocketapi
Advanced tools
GatsbyJS plugin fetching data from Pocket API.
Gatsby 4
and Gatsby 5
npm install --save gatsby-source-pocketapi
Go to https://getpocket.com/developer/ and create a new app to get your consumer key.
Run node node_modules/node-getpocket/authorise --consumerkey 'YOUR-CONSUMER-KEY'
and point your browser to http://127.0.0.1:8080 to get your POCKET_ACCESS_TOKEN
string.
For more info on this process see https://github.com/vicchi/node-getpocket, which this plugin uses to talk to the Pocket API.
In your gatsby-config.js
module.exports = {
plugins: [
{
resolve: `gatsby-source-pocketapi`,
options: {
consumerKey: INSERT_HERE_YOUR_POCKET_CONSUMER_KEY,
accessToken: INSERT_HERE_YOUR_POCKET_ACCESS_TOKEN,
weeksOfHistory: 52,
apiMaxRecordsToReturn: 10000,
getCurrentWeekOnly: `n`,
stateFilterString: 'archive',
tagFilter: false,
tagFilterString: '_untagged_',
favouriteFilter: false,
favouriteFilterValue: 0,
searchFilter: false,
searchFilterString: 'These 21 things',
domainFilter: false,
domainFilterString: 'buzzfeed.com',
},
},
],
};
n
will fetch data based on the settings above.y
returns the current week and the last week (it'll make sense when you try it).unread
= only return unread items.archive
= only return archived items.all
= return both unread and archived items.true
will use the tagFilterString
value to get articles with that tag.false
will ignore the tagFilterString
valuetagFilter
is true then get articles tagged with this value. '\_untagged\_'
will only return articles with no tags.true
will use the favouriteFilterValue
to get articles that have/have not been favourited in Pocketfalse
will ignore the favouriteFilterValue
0
= only return un-favorited items1
= only return favorited itemstrue
will use the searchFilterString
value to get articles with that value in the URL or title.false
will ignore the searchFilterString
valuesearchFilter
is true then get articles with this value in the URL or title.true
will use the domainFilterString
value to get articles for that domain.false
will ignore the domainFilterString
valuedomainFilter
is true then get articles from this domain.Below is a sample query for fetching all Article nodes.
query PageQuery {
allPocketArticle(sort: { fields: readWeek }) {
edges {
node {
id
url
title
favourite
excerpt
is_article
is_index
has_video
has_image
word_count
tags
time_read
readDay
readWeek
articleDomain
domainFavicon
image {
item_id
src
width
height
}
}
}
}
}
This plugin contains code or other contributions of the open source community. The original code was written by Conrad Jackson who maintained it since March 13, 2018 at https://github.com/conradj/gatsby-source-pocket. On February 5, 2023 the project has moved, with approval of Conrad, to https://github.com/Vacilando/gatsby-source-pocketapi where it continues to this day. Thank you again, @conradj, for your trust and a chance to steer the development of this plugin into the future.
An example site for this plugin is available:
FAQs
GatsbyJS plugin fetching data from Pocket API
We found that gatsby-source-pocketapi demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.