Skip to content

Conversation

@StaehliJ
Copy link
Contributor

Pull request

Description

To make API easier, AnalyticsConfig.sourceKey has been transformed to an enum type.

val config = AnalyticsConfig(
    vendor = AnalyticsConfig.Vendor.SRG,
    nonLocalizedApplicationName = "Pillarbox",
    appSiteName = "pillarbox-demo-android",
    sourceKey = SourceKey.SRG_DEBUG,
    userConsent = initialUserConsent
)

Changes made

  • Introduce SourceKey enum.
  • Old constants are depreciated.

Checklist

  • APIs have been properly documented (if relevant).
  • The documentation has been updated (if relevant).
  • New unit tests have been written (if relevant).
  • The demo has been updated (if relevant).

@StaehliJ StaehliJ linked an issue Feb 19, 2025 that may be closed by this pull request
@github-actions
Copy link

github-actions bot commented Feb 19, 2025

Code Coverage

Overall Project 51.28% -0.01% 🟢
Files changed 95.83% 🟢

Module Coverage
:pillarbox-analytics 87.62% -0.14% 🟢
Files
Module File Coverage
:pillarbox-analytics SourceKey.kt 100% 🟢
AnalyticsConfig.kt 97.94% -2.06% 🟢
CommandersActSrg.kt 75.69% 🟢
SRGAnalytics.kt 48.95% 🟢

@MGaetan89
Copy link
Contributor

Don't forget to also update the related documentation 🙂

@StaehliJ StaehliJ requested a review from MGaetan89 February 19, 2025 12:24
@StaehliJ StaehliJ enabled auto-merge February 19, 2025 16:14
@StaehliJ StaehliJ added this pull request to the merge queue Feb 19, 2025
Merged via the queue into main with commit 7eb7745 Feb 19, 2025
8 checks passed
@StaehliJ StaehliJ deleted the 895-avoid-arbitrary-source-keys branch February 19, 2025 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

Avoid arbitrary source keys

2 participants