8000 GitHub - d-lopes/sportradar-api-proxy: SportRadar API proxy
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

d-lopes/sportradar-api-proxy

Repository files navigation

SportsRadar API Proxy πŸˆπŸ€βš½

A lightweight proxy for the SportsRadar API, simplifying integration and resolving CORS issues.

Features

βœ… Automatic API Key Handling – Appends API key to all forwarded requests
βœ… Transparent Responses – Returns exact results from the SportsRadar API
βœ… CORS-Friendly – Enables access from any domain, avoiding browser CORS issues

Effortless SportsRadar API access, with no headaches! πŸš€

Prerequisites

Install runtime dependencies using the corresponding script for your OS:

sh install-on-mac.sh

Usage

1️⃣ Set up your API Key:

cp .sample.env .env
# Edit .env to set your API key

2️⃣ Start the proxy using Docker Compose:

docker-compose up -d

After startup, access the API locally:
πŸ”— http://localhost:8080/nfl/... (forwards requests to the SportsRadar API)

3️⃣ Check logs, if necessary:

docker-compose logs -f

4️⃣ Stop the service:

docker-compose down

Development & Contribution

This project is developed using Camel JBang and GraalVM. These dependencies should be installed on your local machine to aid further development of the project.

Set Up Development Environment

Install dependencies (JBand & Apache Camel) for development:

sh setup-4-dev-on-mac.sh

For native image testing, additionally install GraalVM:

sdk install java 23.0.2-graal

Modifying Camel Routes

Routes are defined in: πŸ“‚ src/main/resources/camel/routing.camel.yaml

πŸ” Find available components: Camel Components Documentation

Testing Adjustments

Quickly test changes to routes with:

camel run camel-jbang.properties ./**/*.camel.yaml

You can use and extend the prepared HTML sample file underneath src/test/resources/sample.html to check whether your adjustments worked correctly.

Build & Run the Application

Compile the application:

./mvnw clean package

Run the packaged JAR:

java -jar target/quarkus-app/quarkus-run.jar

Docker Support

Create and Run a Docker Container

Build the Docker image:

docker build -f Dockerfile -t sport-radar-proxy:latest .

If you want to build and immediately run the new container version, you can do so by using the prepared docker-compose.local-jvm.yaml:

docker-compose up -d -f docker-compose.local-jvm.yaml

Build & Run a Native Docker Container

For a smaller, faster native container run the following:

docker build -f Dockerfile.native -t sport-radar-proxy:native-latest .

If you want to build and immediately run the new native container version, you can do so by using the prepared docker-compose.local-native.yaml:

docker-compose up -d -f docker-compose.local-native.yaml

License

This project is licensed under the Apache License 2.0.

About

SportRadar API proxy

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors 2

  •  
  •  
0