0.0.7 • Published 6 years ago

gatsby-source-newsapi v0.0.7

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

gatsby-source-newsapi

Source plugin for pulling data into Gatsby from NewsAPI.

Install

npm i --save gatsby-source-newsapi

How to use

// In your gatsby-config.js
plugins: [
  {
    resolve: `gatsby-source-newsapi`,
    options: {
      apiKey: `YOUR_NEWSAPI_KEY_HERE`,
    },
  },
];

How to query

Get the Top Headlines

{
  allNewsApiTopHeadlines {
    edges {
      node {
        source {
          id
          name
        }
        title
        author
        description
        url
        urlToImage
        publishedAt
      }
    }
  }
}
0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago