···2233<img src="https://raw.githubusercontent.com/taciturnaxolotl/takes/main/.github/images/smokie.svg" height="175" align="right" alt="smokie the bear">
4455-> ### More deets coming soon ๐
55+> ### More deets coming soon ๐ ๐๏ธ ๐น
66> A slack bot that tracks takes and accepts uploads; developed with ๐ @ [Hack Club](https://github.com/hackclub)
77>
88> โ ๏ธ **Highly opinionated slack bot warning** - Project rapidly iterating
991010-# ๐ง Dev
1010+## ๐ง Dev
11111212You can launch the bot locally with bun
1313···3737SENTRY_DSN="https://xxxxxx@xxxxxx.ingest.us.sentry.io/xxxx"
3838DATABASE_URL="postgres://username:password@host:5432/smokie"
3939CDN_TOKEN="cdn_token"
4040+```
4141+4242+## ๐ API Docs
4343+4444+all endpoints are prefixed with `/api` and return JSON unless specified otherwise
4545+4646+```
4747+GET /api/video?media=<url>
4848+```
4949+returns an HTML page with a video player for the given media URL
5050+5151+```
5252+GET /api/recentTakes?user=<userId>
5353+```
5454+returns recent takes, optionally filtered by user ID
5555+- if user not found, returns `404` with an empty takes array
5656+- returns up to 40 takes ordered by creation date (newest first)
5757+- includes project info and total time stats
5858+5959+```
6060+GET /api/projects?user=<userId>
6161+```
6262+returns project info
6363+- with user param: returns a single project for that user
6464+- without user param: returns all projects
6565+- returns empty array if no projects found
6666+6767+typical take object looks like:
6868+```ts
6969+{
7070+ id: string;
7171+ userId: string;
7272+ notes: string;
7373+ createdAt: Date;
7474+ mediaUrls: string[];
7575+ elapsedTime: number; // seconds
7676+ project: string;
7777+ totalTakesTime: number; // seconds
7878+}
4079```
41804281## ๐ License