Skip to content

[Network] Implement StatsApiService and data models #36

@LeGeRyChEeSe

Description

@LeGeRyChEeSe

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

  • StatsCollectRequestgames: List<GameStat>, tier: String, timestamp: Long
  • GameStatpackage_name: String, is_favorite: Boolean
  • StatsCollectResponsemessage: String
  • ConsentRequest / ConsentResponse
  • UserTierResponseemail, 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    Status

    Todo

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions