0.0.2 • Published 5 years ago
@pqt/gatsby-source-unsplash v0.0.2
gatsby-source-unsplash
Installation
npm install @pqt/gatsby-source-unsplash
# OR
yarn add @pqt/gatsby-source-unsplash
plugins: [
{
resolve: `gatsby-source-unsplash`,
options: {
accessKey: process.env.UNSPLASH_ACCESS_KEY,
username: process.env.UNSPLASH_USERNAME,
},
},
// ...
],
Fetched Data
The short and sweet of what endpoints are actually being hit right now
Entity | Endpoint |
---|---|
User Profile | /user/:username |
User Statistics | /user/:username/statistics |
User Photos | /user/:username/photos |
Options
Example
Now in your GraphiQL Playground, you can try something like getting your total view count
# unsplash.stats.views.total
query MyQuery {
unsplash: unsplashUserProfile {
stats {
views {
total
}
}
}
}
License
MIT