darkstormgames / darkstormgames/mkcentral-api

Audit and consolidate Roster name/tag field aliases

Open
#6 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
TypeScript
Stars
2
Forks
0
PR merge metrics
No merged PRs in 30d

Description

### Description

The `Roster` class currently maintains separate properties for similar naming concepts that could potentially be consolidated:

Name vs RosterName vs TeamName
Tag vs RosterTag vs TeamTag

These field aliases exist to handle different API response shapes (team-context vs player-context), but once usage patterns are fully audited, we should consider collapsing these into unified properties.
Location

File: `src/lib/common/Roster.ts` (line ~8)
### Tasks

- [ ] Audit all current usages of the name/tag properties across the codebase
- [ ] Document which API endpoints return which field variations
- [ ] Determine if consolidation is feasible without breaking changes
- [ ] If feasible, refactor to use single properties with appropriate fallback logic

### Notes

This refactoring would simplify the API surface and reduce confusion about which property to use in different contexts.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.