Skip to content

Conversation

razmikb
Copy link

@razmikb razmikb commented May 20, 2025

Add data class for Mozilla language statistics API response

razmikb added 4 commits May 20, 2025 21:32
Add data class for Mozilla language statistics API response
Modify StatsRepository to use new Mozilla API for language stats
@razmikb
Copy link
Author

razmikb commented May 20, 2025

Hi, I've attempted to fix issue #211 based on the suggestions.

Changes made:

  1. Added a data class MozillaLanguageStat.kt for the new Mozilla API response.
  2. Added a new method getMozillaLanguageStats() to StatsService.kt to call https://commonvoice.mozilla.org/api/v1/stats/languages.
  3. Updated StatsRepository.kt in the getStats() method to use this new API call and transform the data to the expected Map<String, ResponseDailyUsage> format.

Please review these changes. Since I'm not a programmer, I relied on AI guidance to make these edits.

@Sav22999 Sav22999 added 📱 app This is about the app; category: general/other 📈 statistics This is about "statistics" labels May 22, 2025
@Sav22999
Copy link
Collaborator

@razmikb Thank you very much for you contribution.

In this period I am busy as well (as always... basically), so I don't have too much time to review this PR.

I promise I'll do in future (in some months...) sorry for the "not-too-fast" review. I really appreciate your contribution to the CV Project app (and to Common Voice in general, actually). Thanks!

@razmikb
Copy link
Author

razmikb commented May 23, 2025

@Sav22999 no worries, I get. it might turn out to be trash-code, because I have no idea what AI made 😅. I just described the issue step-by-step and it gave me this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📱 app This is about the app; category: general/other 📈 statistics This is about "statistics"

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants