Skip to content

Celest151/teamwater

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 

Repository files navigation

πŸ’§ TeamWater API Wrapper

A simple Flask application that fetches and exposes public Tiltify donation data for the #TeamWater campaign β€” a historic effort to raise $40 million to provide clean water to two million people.

🌍 About #TeamWater

#TeamWater will be the biggest and most impactful campaign for clean water in history. With thousands of the world's top Creators talking about water, we're changing the world, one drop at a time.


πŸš€ Features

This app provides three public API endpoints:

  • /leaderboard – Returns top donors for the campaign.
  • /donations – Returns the latest donations made to the campaign.
  • /total_raised – Returns the total amount raised.

All data is fetched from the Tiltify API using GraphQL queries.


πŸ“¦ Requirements

  • Python 3.7+
  • Flask
  • requests

Install dependencies:

pip install Flask requests

βš™οΈ Running the App

python app.py

By default, the app will run on http://localhost:5000.


πŸ”Œ API Usage

/leaderboard

Query Parameters:

  • limit: (optional) number of donors to return (default: 5)
  • fact_id: (optional) Tiltify fact (campaign) ID

Example:

GET /leaderboard?limit=10

/donations

Query Parameters:

  • limit: (optional) number of donations to return (default: 10)
  • fact_id: (optional) Tiltify fact (campaign) ID

Example:

GET /donations?limit=5

/total_raised

Query Parameters:

  • fact_id: (optional) Tiltify fact (campaign) ID

Example:

GET /total_raised

πŸ”’ Notes

  • The default campaign fact ID is: 0478358a-c4ff-4ab0-9cc7-5f0b328df9dc (used if fact_id is not specified).
  • This app uses the public Tiltify API, which does not require authentication for read-only data.

❀️ Contributing

Pull requests are welcome. For major changes, please open an issue first.


πŸ“„ License

MIT β€” feel free to use and adapt.

About

A simple Flask API that fetches and exposes TeamWater/Tiltify fundraising data, including donor leaderboard, recent donations, and total amount raised. Easily configurable via query parameters for limits and event selection. Suitable for dashboards or integrations.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages