Skip to content

feat: integrate Hell Divers 2 community API - #1

Merged
surrealwolf merged 8 commits into
mainfrom
feature/hell-divers-api-integration
Oct 20, 2025
Merged

surrealwolf merged 8 commits into
mainfrom
feature/hell-divers-api-integration

Conversation

@surrealwolf

@surrealwolf surrealwolf commented Oct 19, 2025 •

Copy link
Copy Markdown
Collaborator

Overview

Integrates the community-maintained Hell Divers 2 API with comprehensive data collection and endpoint coverage.

Changes

  • Scraper: Updated with new API endpoints (assignments, dispatches, planet-events)
  • Smart extraction: Statistics, factions, and biomes intelligently extracted from primary endpoints
  • Headers: Added required X-Super-Client and X-Super-Contact headers to all requests
  • Collector: Enhanced to gather new data types (assignments, dispatches, events)

New Endpoints

  • get_assignments() - Major Orders
  • get_dispatches() - News and announcements
  • get_planet_events() - Special planet events

API Details

  • Rate limit: 5 requests per 10 seconds
  • Headers required: X-Super-Client, X-Super-Contact
  • Status: Live and actively maintained (257⭐ on GitHub)

Testing

API integration has been tested and confirmed to return live war data:

  • 69,466 active players
  • 713.16M missions won
  • 166.54B terminid kills
  • Real-time global statistics

@surrealwolf surrealwolf changed the title feat: integrate Hell Divers 2 community API (api.helldivers2.dev) feat: integrate Hell Divers 2 community API Oct 20, 2025
@surrealwolf surrealwolf self-assigned this Oct 20, 2025
@surrealwolf
surrealwolf requested a review from Copilot October 20, 2025 00:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Integrates the community-maintained Hell Divers 2 API (api.helldivers2.dev) to replace the original API endpoints, adding comprehensive data collection capabilities and required authentication headers.

  • Updated API base URL and added required X-Super-Client/X-Super-Contact headers
  • Added new endpoints for assignments, dispatches, and planet events
  • Implemented smart data extraction for statistics, factions, and biomes from primary endpoints

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/scraper.py Updated API endpoints, headers, and added new data collection methods
src/config.py Added configuration for API client name and contact headers
src/collector.py Enhanced data collection to include assignments, dispatches, and planet events
tests/demo.py Added mock testing infrastructure with unittest.mock patches
pyproject.toml Added types-requests dependency for better type checking
.env.example Updated with new API configuration examples and documentation

Comment thread tests/demo.py
Comment thread tests/demo.py
Comment thread tests/demo.py
Comment thread src/scraper.py Outdated
Comment thread src/collector.py
@surrealwolf
surrealwolf requested a review from Copilot October 20, 2025 00:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Comment thread tests/demo.py
Comment thread tests/demo.py
Copilot AI review requested due to automatic review settings October 20, 2025 01:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Comment thread tests/demo.py
Comment thread tests/demo.py
Comment thread src/collector.py Outdated
@surrealwolf
surrealwolf merged commit cdb6f4e into main Oct 20, 2025
8 checks passed
@surrealwolf
surrealwolf deleted the feature/hell-divers-api-integration branch October 20, 2025 02:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants