Skip to content

AsLeonardo/Steam-Springboot-Test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project Alpha - Steam API Integration

A Spring Boot application that integrates with the Steam Web API to retrieve game ownership information.

Features

  • Fetch owned games from Steam
  • Get playtime statistics
  • View game achievements
  • Easy configuration with environment variables

Prerequisites

  1. Java Development Kit (JDK) 11 or higher
  2. Maven or Gradle
  3. Steam API Key (free from https://steamcommunity.com/dev)

Setup Instructions

1. Get a Steam API Key

  1. Go to https://steamcommunity.com/dev
  2. Log in with your Steam account
  3. Agree to the terms and get your API key
  4. Store your key securely

2. Configure the API Key

There are two ways to configure your Steam API key:

Option A: Using environment variables (Recommended)

set STEAM_API_KEY=your_api_key_here

Option B: Using application.properties Edit src/main/resources/application.properties and add:

steam.api.key=your_api_key_here

3. Build the Application

mvn clean package

4. Run the Application

java -jar target/project-alpha-0.0.1-SNAPSHOT.jar

Or use Maven:

mvn spring-boot:run

API Endpoints

Get Owned Games

Endpoint: GET /api/steam/owned-games

Query Parameters:

  • steamId - Your Steam 64-bit ID

Example Request:

curl "http://localhost:8080/api/steam/owned-games?steamId=76561198000000000"

Test Endpoint

Endpoint: GET /api/steam/test

Returns a simple test message to verify the server is running.

Example Request:

curl "http://localhost:8080/api/steam/test"

Getting Your Steam 64-bit ID

To get your Steam ID:

  1. Go to https://steamid.io/
  2. Enter your Steam username or profile URL
  3. Copy the "Steam64" ID
  4. Use this ID in your API requests

Response Format

The API returns a JSON response with your owned games information, including:

  • Game names
  • Playtime in hours
  • Last played dates
  • Achievement progress

Project Structure

src/
├── main/
│   ├── java/
│   │   └── com/example/project_alpha/
│   │       ├── controller/
│   │       │   └── SteamController.java
│   │       ├── model/
│   │       │   ├── GameDetails.java
│   │       │   └── SteamApiResponse.java
│   │       ├── service/
│   │       │   └── SteamService.java
│   │       └── config/
│   │           └── RestTemplateConfig.java
│   └── resources/
│       └── application.properties
└── test/
    └── java/
        └── com/example/project_alpha/
            └── controller/
                └── SteamControllerTest.java

Troubleshooting

API Key Issues

  • Make sure your API key is valid and not expired
  • Check that your Steam ID is correct
  • Ensure you have internet connectivity

404 Errors

  • Verify your Steam ID is correct
  • Some games may not have AppInfo available

500 Errors

  • Check your API key is properly configured
  • Verify your network connection
  • Look at the logs for more details

To Do

Pair correctly with the browser server Make it return custom info

About

Side project of trying to pair Springboot with browser server

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages