helldivers2-api
Advanced tools
Comparing version 1.0.2 to 1.0.3
import WarSeasonRepository from "./src/repository/WarSeasonRepository.js"; | ||
import WarInfoRepository from "./src/repository/WarInfoRepository.js"; | ||
import WarNewsFeedRepository from "./src/repository/WarNewsFeedRepository.js"; | ||
@@ -7,2 +8,3 @@ export default { | ||
getWarInfo: (warId) => WarInfoRepository.getById(warId), | ||
getWarNewsFeed: (warId, timestamp = null) => WarNewsFeedRepository.getByWarId(warId, timestamp), | ||
} |
{ | ||
"name": "helldivers2-api", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "An API wrapper for Helldivers 2", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
# Helldivers 2 API | ||
[](https://github.com/EdouardCourty/helldivers2-api/actions/workflows/ESLint.yml) | ||
This project aims to create an API wrapper for Helldivers 2.<br /> | ||
@@ -10,5 +12,7 @@ I have been playing the game a lot since it is out, and I wanted to try and build something around it.<br /> | ||
- [X] Get WarSeason | ||
- [X] Get WarInfo | ||
- [ ] Get PlayerData | ||
- [X] Get war season | ||
- [X] Get war info | ||
- [X] Get war news feed | ||
- [ ] Player endpoints | ||
- [ ] Global statistics endpoints | ||
@@ -19,2 +23,4 @@ ### Contributing | ||
If you want to | ||
If you want to chat with me, get in touch using my email address or Discord: `php_sensei` | ||
© Edouard Courty - 2024 |
@@ -1,2 +0,2 @@ | ||
import { AxiosResponse } from "axios"; | ||
import axios from "axios"; | ||
@@ -22,3 +22,3 @@ export default class HttpErrorException extends Error { | ||
/** | ||
* @returns AxiosResponse | ||
* @returns axios.AxiosResponse | ||
*/ | ||
@@ -25,0 +25,0 @@ getResponse() { |
@@ -10,3 +10,7 @@ import axios from "axios"; | ||
this.#instance = axios.create({ | ||
baseURL: 'https://api.live.prod.thehelldiversgame.com' | ||
baseURL: 'https://api.live.prod.thehelldiversgame.com', | ||
headers: { | ||
'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36', | ||
'Accept-Language': 'fr-FR,fr;q=0.9,en-GB;q=0.8,en;q=0.7,en-US;q=0.6' | ||
} | ||
}); | ||
@@ -13,0 +17,0 @@ } |
19443
31
461
25