When I wrote this package, I somehow didn't notice that gatsby-source-meetup already exists. It fills the same purpose and has more advanced configuration options so I recommend you use that. Just leaving the source code on GitHub for posterity since I already wrote it.
Fetches events from the Meetup.com API. Useful when you are building a website for a Meetup group and wish to display information about upcoming events.
npm install gatsby-source-meetup --save
or
yarn add gatsby-source-meetup
Add the plugin to your gatsby-config.js
. There is one required option, meetupSlug
, which is the unique slug of your Meetup.com group. If your group is at https://www.meetup.com/Awesome-Coders
then your meetupSlug
is 'Awesome-Coders'
.
module.exports = {
plugins: [
{
resolve: "gatsby-source-meetup",
options: {
meetupSlug: "your-meetup"
}
}
]
};
You can then query allMeetupEvents
to fetch event data:
query {
allMeetupEvents {
edges {
node {
name
time
duration
venue {
name
address1
city
state
}
}
}
}
}
You can reference Meetup's API documentation for a full list of fields that can be queried; note that you will need to use camelCased field names in the query (even though they are snake_cased in Meetup's documentation).
- Fork the repository (https://github.com/schneidmaster/gatsby-source-meetup/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new pull request on GitHub