0.0.7 • Published 8 years ago

gatsby-source-newsapi v0.0.7

Weekly downloads
2
License
MIT
Repository
github
Last release
8 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

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago