API Dumper is a Go-based command-line tool designed to fetch and store data from various public APIs. The initial implementation focuses on TheMealDB API, which provides a comprehensive database of meal recipes.
- Fetch meal data from TheMealDB API.
- Transform and store the fetched data in a structured format.
- Configurable request delay to avoid hitting API rate limits.
- Modular design to easily add support for more APIs in the future.
- Ensure you have Go installed on your machine. You can download it from golang.org.
- Clone this repository:
git clone cd api-dumper go run main.go - Install dependencies:
go mod tidy
- Create a
.envfile in the root directory with the following content:DEV_URL="https://www.themealdb.com/api/json/v1/1/" DEV_API_KEY="1" // Use "1" for TheMealDB free API ENVIRONMENT="development" // or production if you have an API Key REQUEST_DELAY_SECONDS=3 PROD_API_URL="" PROD_API_KEY=""
- Run the application:
go run main.go