Skip to content

Clubs Connect API

A simple REST API for accessing upcoming events from the Clubs Connect project.
Deployed on Render and powered by Supabase.

https://clubs-connect-api.onrender.com

  • Description: Confirms that the server is running.
  • Response Example:
{
"message": "Server is running!",
"timestamp": "2025-09-02T22:30:15.123Z"
}
  • Description: Fetch all upcoming events (only events with a future date).
  • Method**: GET
  • Authentication: None required (public).
[
{
"id": 1,
"title": "Tech Meetup",
"date": "2025-09-15T18:00:00Z",
"location": "Cape Town",
"description": "Networking and tech talks"
},
{
"id": 2,
"title": "AI Workshop",
"date": "2025-09-20T10:00:00Z",
"location": "Johannesburg",
"description": "Hands-on session on AI tools"
}
]

{ “error”: “Failed to fetch events” }

JavaScript (React / Browser)

fetch(“https://clubs-connect-api.onrender.com/api/events”) .then(res => res.json()) .then(data => console.log(data)) .catch(err => console.error(err));

Python

import requests

res = requests.get(“https://clubs-connect-api.onrender.com/api/events”) print(res.json())

cURL

curl https://clubs-connect-api.onrender.com/api/events

  • API is read-only for now (GET only).
  • Data comes from the events table in Supabase.
  • Do not use Supabase service keys directly — always go through this API.
  • API auto-updates when new events are added to Supabase.

These endpoints may be added later:

  • POST /api/events → Add new event
  • GET /api/events/:id → Get event by ID
  • PUT /api/events/:id → Update event
  • DELETE /api/events/:id → Remove event