How cobbfan9/swgoh-assetapi works
SWGoH AssetAPI is a FastAPI service for retrieving Star Wars: Galaxy of Heroes asset bundles, manifests, and decoded textures. The principal workflow is an HTTP request, optional HMAC verification and Comlink version lookup, then endpoint-level manifest or bundle handling, EA asset retrieval, and (for texture endpoints) Unity decoding into PNG or base64 results. It also supports manifest comparisons, raw bundle downloads, and temporary-file cleanup. Relationships below are grounded in README documentation and the supplied source excerpts/index; some endpoint internals were only partially excerpted.
Main entry points: Endpoints.py Asset endpoints · assetapi.py HTTP routes · RequestManager.py Asset HTTP client · ManifestDecoder.py Manifest decoding
Components 18
API and access
- HTTP routes
assetapi.py - HMAC verification
helpers/HMACDecoder.py - Comlink version
helpers/RequestManager.py
Manifest operations
- Manifest decoding
helpers/ManifestDecoder.py - Manifest schema
helpers/ManifestDecoderHelper.py - Manifest comparison
helpers/ManifestDiff.py - Manifest cache
Asset retrieval
- Asset endpoints
helpers/Endpoints.py - Asset HTTP client
helpers/RequestManager.py - Bundle cache
- Texture decoding
helpers/Texture2DDecoder.py - Bundle response
helpers/Endpoints.py
Runtime utilities
- Temporary cleanup
helpers/FileCleaner.py - File coordination
helpers/FileLock.py - API types
helpers/TypeHelpers.py - Logging
helpers/Logger.py
Other components
- API client
- EA asset server
Connections 25
- API client → HTTP routes: requests
README.md - HTTP routes → HMAC verification: verifies
assetapi.py - HTTP routes → Comlink version: looks up version
assetapi.py - HTTP routes → Asset endpoints: dispatches
assetapi.py - HTTP routes → Temporary cleanup: runs cleanup
assetapi.py - Asset endpoints → Manifest decoding: loads manifest
helpers/Endpoints.py - Asset endpoints → Manifest comparison: compares manifests
helpers/Endpoints.py - Manifest decoding → Asset HTTP client: fetches manifest
helpers/ManifestDecoder.py - Manifest decoding → Manifest schema: parses bytes
helpers/ManifestDecoder.py - Manifest decoding → Manifest cache: writes manifest
helpers/ManifestDecoder.py - Asset endpoints → Manifest cache: reads manifests
helpers/Endpoints.py - Asset endpoints → Asset HTTP client: downloads bundles
helpers/Endpoints.py - Asset HTTP client → EA asset server: fetches assets
helpers/RequestManager.py - Asset HTTP client → Bundle cache: saves bundles
helpers/RequestManager.py - Asset endpoints → Bundle cache: reads bundles
helpers/Endpoints.py - Asset endpoints → Texture decoding: decodes textures
helpers/Endpoints.py - Asset endpoints → Bundle response: returns bundle
helpers/Endpoints.py - Temporary cleanup → Bundle cache: deletes files
README.md - Temporary cleanup → Manifest cache: deletes files
README.md - Asset endpoints → File coordination: coordinates access
helpers/Endpoints.py - Asset HTTP client → File coordination: locks writes
helpers/RequestManager.py - Manifest decoding → File coordination: locks writes
helpers/ManifestDecoder.py - HTTP routes → API types: uses parameters
assetapi.py - Asset endpoints → API types: uses enums
helpers/Endpoints.py - Comlink version → Asset HTTP client: posts metadata
helpers/RequestManager.py