Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/keyvanakbary/clubsync
Tool for syncing Clubhouse API into MySQL
https://github.com/keyvanakbary/clubsync
clubhouse clubhouse-api mysql sync
Last synced: about 1 month ago
JSON representation
Tool for syncing Clubhouse API into MySQL
- Host: GitHub
- URL: https://github.com/keyvanakbary/clubsync
- Owner: keyvanakbary
- Created: 2019-11-15T18:12:01.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-01-22T15:40:46.000Z (almost 4 years ago)
- Last Synced: 2023-03-14T20:10:34.435Z (almost 2 years ago)
- Topics: clubhouse, clubhouse-api, mysql, sync
- Language: Elixir
- Homepage:
- Size: 12.7 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Clubsync
Tool for syncing [Clubhouse API](https://clubhouse.io/api/rest/v3/) and a MySQL database of your choice. It pulls new data every 15 minutes by default.
## Motivation
[Clubhouse](https://clubhouse.io/) allows you to access all your organisation data via their API. Unfortunately, for complex queries you'll have to chain multiple requests to relate entities, and take care of throttling among others. By syncing Clubhouse data into a relational database, you won't have to worry about the details, just query your database for the information you need.
## Run
Run the image
docker run \
-e DB_NAME="clubsync" \
-e DB_USER="clubsync" \
-e DB_PASS="pass" \
-e DB_HOST="localhost" \
-e CLUBHOUSE_API_TOKEN="YOUR_TOKEN" \
keyvanakbary/clubsyncAdditionally, you can pass the following environment variables
* `DB_PORT`, defaults to `3306`
* `CRON_SCHEDULE`, defaults to `*/15 * * * *` (every 15 minutes)Run the tool along with a MySQL database via docker-compose
CLUBHOUSE_API_TOKEN="YOUR_TOKEN" docker-compose up
---
Run just the database
docker-compose up mysql
Run the service via Mix
CLUBHOUSE_API_TOKEN="YOUR_TOKEN" mix run
Sync all via Mix task
CLUBHOUSE_API_TOKEN="YOUR_TOKEN" mix sync.all