Description
Create the network layer to communicate with the vrhub-monetization server for statistics collection.
Files to create
app/src/main/java/com/vrhub/network/StatsApiService.kt
app/src/main/java/com/vrhub/network/StatsModels.kt
Endpoints to implement
| Method |
Endpoint |
Description |
| POST |
/stats/collect |
Send anonymized stats |
| POST |
/stats/consent |
Update consent status |
| GET |
/user/tier?email= |
Fetch user tier |
Data models
StatsCollectRequest — games: List<GameStat>, tier: String, timestamp: Long
GameStat — package_name: String, is_favorite: Boolean
StatsCollectResponse — message: String
ConsentRequest / ConsentResponse
UserTierResponse — email, tier, status
Integration
- Base URL from
ServerConfig.monetizationUrl (fallback: https://vrhub.sunshine-aio.com)
- Add to existing Retrofit builder (Gson converter)
Reference
docs/CLIENT_SPEC.md §4, §7
docs/CLIENT_IMPLEMENTATION.md §3
Description
Create the network layer to communicate with the
vrhub-monetizationserver for statistics collection.Files to create
app/src/main/java/com/vrhub/network/StatsApiService.ktapp/src/main/java/com/vrhub/network/StatsModels.ktEndpoints to implement
/stats/collect/stats/consent/user/tier?email=Data models
StatsCollectRequest—games: List<GameStat>, tier: String, timestamp: LongGameStat—package_name: String, is_favorite: BooleanStatsCollectResponse—message: StringConsentRequest/ConsentResponseUserTierResponse—email, tier, statusIntegration
ServerConfig.monetizationUrl(fallback:https://vrhub.sunshine-aio.com)Reference
docs/CLIENT_SPEC.md§4, §7docs/CLIENT_IMPLEMENTATION.md§3