Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yinkakun/gatsby-source-hnapi
Source plugin for pulling data into Gatsby from node-hnapi, an unofficial API for Hacker News.
https://github.com/yinkakun/gatsby-source-hnapi
gatsby gatsby-source-hnapi gatsby-source-plugin hackernews
Last synced: about 2 months ago
JSON representation
Source plugin for pulling data into Gatsby from node-hnapi, an unofficial API for Hacker News.
- Host: GitHub
- URL: https://github.com/yinkakun/gatsby-source-hnapi
- Owner: yinkakun
- License: mit
- Created: 2021-12-19T17:52:25.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2021-12-19T19:26:51.000Z (about 3 years ago)
- Last Synced: 2024-10-14T07:11:40.267Z (3 months ago)
- Topics: gatsby, gatsby-source-hnapi, gatsby-source-plugin, hackernews
- Language: JavaScript
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## gatsby-source-hnapi
Source plugin for pulling data into Gatsby from [node-hnapi](https://github.com/cheeaun), an unofficial API for Hacker News.
## Install
```sh
npm install gatsby-source-hnapi#or
yarn add gatsby-source-hnapi
```## How to use
```js
// In your gatsby-config.js
plugins: [`gatsby-source-hnapi`];
```## How To Query
Returns 30 results for `allHnTopstories`, `allHnLateststories`, `allHnBeststories`, `allHnAsks`, `allHnShow`, and `allHnJobs`.
```graphql
query MyQuery {
allHnLatestStories {
nodes {
title
url
points
user
id
time_ago
time
domain
comments
}
}
}
```## Credits
This plugin is wrapper around [node-hnapi](https://github.com/cheeaun/node-hnapi)