Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Jedidiah/gatsby-source-twitch
Gatsby source to fetch data from the Twitch API
https://github.com/Jedidiah/gatsby-source-twitch
gatsby-source gatsbyjs twitch
Last synced: 26 days ago
JSON representation
Gatsby source to fetch data from the Twitch API
- Host: GitHub
- URL: https://github.com/Jedidiah/gatsby-source-twitch
- Owner: Jedidiah
- License: mit
- Created: 2017-11-23T23:01:35.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-03T22:47:04.000Z (almost 2 years ago)
- Last Synced: 2024-10-29T05:38:40.306Z (about 1 month ago)
- Topics: gatsby-source, gatsbyjs, twitch
- Language: JavaScript
- Size: 432 KB
- Stars: 6
- Watchers: 2
- Forks: 2
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: license
Awesome Lists containing this project
- awesome-twitch-dev - Jedidiah/gatsby-source-twitch - Gatsby source to fetch data from the Twitch API. (Libraries / JavaScript (Node.js))
README
# gatsby-source-twitch
A [gatsby](https://www.gatsbyjs.org/) source plugin for fetching all the videos and channel info for a Twitch user ID.
Learn more about Gatsby plugins and how to use them here: https://www.gatsbyjs.org/docs/plugins/
## Install
`npm install --save gatsby-source-twitch`
## gatsby-config.js
```javascript
plugins: [
{
resolve: `gatsby-source-twitch`,
options: {
userID: '<>',
clientID: '<< Add your Twitch client_id here>>'
},
},
...
]
```## Examples of how to query:
Get all the videos:
```graphql
{
allTwitchvideo {
edges {
node {
title
url
type
}
}
}
}
```Get the user/channel info:
```graphql
{
twitchuser {
display_name
description
profile_image_url
}
}
```