-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0815fe5
commit 9e90ee4
Showing
7 changed files
with
973 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Steam Web API Demo | ||
|
||
This is a simple web application that interacts with the Steam Web API to retrieve user profiles and game achievements. | ||
|
||
## Features | ||
|
||
- **User Profile Retrieval**: Enter a Steam ID to fetch and display the user's profile. | ||
- **Game Achievements**: Enter a game ID and Steam ID to retrieve the achievements for that game. | ||
|
||
## Technologies Used | ||
|
||
- **HTML/CSS/JavaScript**: For the frontend. | ||
- **Node.js & Express**: Backend server to handle API requests. | ||
- **Steam Web API**: Fetches data related to Steam user profiles and game achievements. | ||
|
||
## Installation | ||
|
||
### Prerequisites | ||
|
||
- **Node.js** (v12+ recommended) | ||
- **npm** (Node Package Manager) | ||
|
||
### Steps | ||
|
||
1. **Clone the Repository**: | ||
|
||
``` | ||
git clone https://github.com/your-username/steam-web-api-demo.git | ||
cd steam-web-api-demo | ||
``` | ||
|
||
2. **Install Dependecies** | ||
``` | ||
npm install | ||
``` | ||
|
||
## Contributor | ||
### Sree Vidya |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<link rel="stylesheet" href="style.css"> | ||
<title>Steam Web API Demo</title> | ||
</head> | ||
<body> | ||
<h1>Steam Web API Demo</h1> | ||
<div id="app"> | ||
<h2>Get User Profile</h2> | ||
<input type="text" id="steamId" placeholder="Enter Steam ID"> | ||
<button id="getProfileButton">Get Profile</button> | ||
|
||
<h2>Get Game Achievements</h2> | ||
<input type="text" id="gameId" placeholder="Enter Game ID"> | ||
<button id="getAchievementsButton">Get Achievements</button> | ||
|
||
<h2>Results</h2> | ||
<pre id="results"></pre> | ||
</div> | ||
|
||
<script src="index.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
document.getElementById('getProfileButton').addEventListener('click', async () => { | ||
const steamId = document.getElementById('steamId').value; | ||
const response = await fetch(`/getProfile?steamId=${steamId}`); | ||
const result = await response.json(); | ||
document.getElementById('results').textContent = JSON.stringify(result, null, 2); | ||
}); | ||
|
||
document.getElementById('getAchievementsButton').addEventListener('click', async () => { | ||
const gameId = document.getElementById('gameId').value; | ||
const steamId = document.getElementById('steamId').value; | ||
const response = await fetch(`/getAchievements?gameId=${gameId}&steamId=${steamId}`); | ||
const result = await response.json(); | ||
document.getElementById('results').textContent = JSON.stringify(result, null, 2); | ||
}); |
Oops, something went wrong.