Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 25 days ago
JSON representation
Meetup API GQL Client, in Typescript
- Host: GitHub
- URL: https://github.com/cunningdj/meetup-api-client
- Owner: CunningDJ
- Created: 2025-01-20T23:10:58.000Z (25 days ago)
- Default Branch: main
- Last Pushed: 2025-01-20T23:13:32.000Z (25 days ago)
- Last Synced: 2025-01-21T00:23:05.923Z (25 days ago)
- Topics: client, gql, gql-api, javascript, meetup, meetup-api, nodejs, typescript
- Language: TypeScript
- Homepage: https://nyctnb.com
- Size: 21.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Meetup API Client
I had trouble finding a useful client library for Meetup's GQL API, so I made one, complete with Typescript types. Feel free to send PRs or let me know if there's something you think can be added or improved!# Setup
1. Apply for and get an approved [Meetup API Client secret](https://www.meetup.com/api/oauth/list/)
1. [Install nvm](https://github.com/nvm-sh/nvm?tab=readme-ov-file#installing-and-updating)
1. `nvm install`
1. `npm install -g yarn`
1. `yarn install`
1. Copy `cp .env.example .env`
1. Add `MEETUP_API_SECRET` value to .env - the **Secret** value **[here](https://www.meetup.com/api/oauth/list/)** (needs an approved key first - see Step 1)# Quick Start
1. `nvm use`
2. `yarn install`
3. `yarn dev`# Contributing
The [app.ts](src/app.ts) file currently contains sample uses of the GQL query [client functions](src/meetup/client.ts) for quick experimentation. Feel free to look over and expand upon the [Typescript types](src/meetup/index.d.ts), [GQL queries and fragments](src/meetup/queries.ts), or both.I'm also open to other ideas on how to expand on this - this currently stands primarily as a library of client functions to make use of the Meetup API, but I could see new features and improvements (e.g. storage, caching, retry logic, error handling, nicer logging) being built in or adjacent to it.
# 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});
}
```