https://github.com/cunningdj/meetup-api-client
Meetup API GQL Client, in Typescript
https://github.com/cunningdj/meetup-api-client
client gql gql-api javascript meetup meetup-api nodejs typescript
Last synced: 2 months ago
JSON representation
Meetup API GQL Client, in Typescript
- Host: GitHub
- URL: https://github.com/cunningdj/meetup-api-client
- Owner: CunningDJ
- License: apache-2.0
- Created: 2025-01-20T23:10:58.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-02-15T20:31:28.000Z (5 months ago)
- Last Synced: 2025-05-06T00:08:03.740Z (2 months ago)
- Topics: client, gql, gql-api, javascript, meetup, meetup-api, nodejs, typescript
- Language: TypeScript
- Homepage: https://nyctnb.com
- Size: 163 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
![]()
[](https://npmjs.com/package/meetup-api-client)
# MAC: Meetup API Client
There doesn't appear to be any Node client library for [Meetup's GQL API](https://www.meetup.com/api/general/), so I made one for [organizing purposes](https://nyctnb.com), complete with Typescript types.Feel free to [contribute](CONTRIBUTING.md) or [let me know](../../issues) if there's something you think can be added or improved!
## Installing
```bash
$ npm install meetup-api-client
```
You can also use equivalent `yarn`, `pnpm`, or `bower` commands to install.## Getting Started
1. **Optional**: Set `MEETUP_API_SECRET` env variable
* From testing, this only seems necessary for the `proNetwork` query, so this is not necessary to use the other queries in this library
* This the **API Secret** value that must be requested and approved in the **[Meetup API admin console](https://www.meetup.com/api/oauth/list/)** first
* Once this secret key is obtained, it can be set in the env in different ways, but in the [dev environment](CONTRIBUTING.md) for this repo, we use [dotenv](https://www.npmjs.com/package/dotenv)
2. Import (or `require`) the client functions:
```js
import { queryMeetup, queryEvent, queryGroup, queryHealthCheck, queryKeywordSearch, queryProNetwork } from 'meetup-api-client';
```
These are complete with typescript definitions, so you can see what data you can expect to get back from each.## Contributing
If you're interested in contributing, look [here](CONTRIBUTING.md). I'd love if others would like to help build this further into a polished, full-fledged client for the Meetup API. It would help organizers with dev skills do something with all of their group and member data. In the meantime, I'll continue building on it where I find time, and I think in its current state it meets a variety of use cases and taps into a lot of key data in a developer-friendly way.## Meetup API: Background
The query system is based on Meetup API's [GQL schema](https://www.meetup.com/api/schema/#graphQl-schema). It uses an axios version of this query:```bash
query='query { self { id name } }'
curl -X POST https://api.meetup.com/gql \
-H 'Authorization: Bearer {YOUR_TOKEN}' \
-H 'Content-Type: application/json' \
-d @- < {
return axiosClient.post('', {'query': gqlQuery});
}
```