Skip to content

Commit c81ff7c

Browse files
committed
Docs: Improve KDoc for public API
This commit enhances the KDoc documentation across several public API classes and handlers to improve clarity and developer experience. * **Ad Handlers:** * Added `@property` documentation for the `state` property in `InterstitialAdHandler`, `RewardedAdHandler`, and `RewardedInterstitialAdHandler`. * Added `@property` documentation for `state` and `adSize` in `BannerAdHandler`. * **`RewardItem`:** * Added a class-level KDoc summary and `@property` documentation for `amount` and `type`. * **`RequestConfiguration`:** * Added descriptive comments for all constants related to child-directed treatment, age of consent, and maximum ad content rating. * **`ConsentDebugSettings`:** * Updated the KDoc for the `DebugGeography` enum to use `@property` tags for better readability in generated documentation.
1 parent 4ba1a90 commit c81ff7c

7 files changed

Lines changed: 29 additions & 6 deletions

File tree

basic-ads/src/commonMain/kotlin/app/lexilabs/basic/ads/BannerAdHandler.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ package app.lexilabs.basic.ads
5454
* ```
5555
*
5656
* @param activity The platform-specific activity or context required for displaying the ad (e.g., an Android `Activity`).
57+
* @property state The current [AdState] of the banner ad.
58+
* @property adSize The active [AdSize] of the banner ad.
5759
*/
5860
@DependsOnGoogleMobileAds
5961
public expect class BannerAdHandler(activity: Any?) {

basic-ads/src/commonMain/kotlin/app/lexilabs/basic/ads/ConsentDebugSettings.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,11 @@ public expect class ConsentDebugSettings {
9595
* These settings allow developers to simulate user locations to test how the
9696
* [Consent.requestConsentInfoUpdate] behaves under different geographical regulations.
9797
*
98-
* @see DEBUG_GEOGRAPHY_DISABLED Disables debug geography settings. The consent SDK will behave as if the device is not in a debug geography.
99-
* @see DEBUG_GEOGRAPHY_EEA Simulates the device being located within the European Economic Area (EEA).
100-
* @see DEBUG_GEOGRAPHY_NOT_EEA Simulates the device being located outside the European Economic Area (EEA).
101-
* @see DEBUG_GEOGRAPHY_REGULATED_US_STATE Simulates the device being located in a US state with specific privacy regulations (e.g., California).
102-
* @see DEBUG_GEOGRAPHY_OTHER Simulates the device being located in a region not covered by the other specific debug geographies.
98+
* @property DEBUG_GEOGRAPHY_DISABLED Disables debug geography settings. The consent SDK will behave as if the device is not in a debug geography.
99+
* @property DEBUG_GEOGRAPHY_EEA Simulates the device being located within the European Economic Area (EEA).
100+
* @property DEBUG_GEOGRAPHY_NOT_EEA Simulates the device being located outside the European Economic Area (EEA).
101+
* @property DEBUG_GEOGRAPHY_REGULATED_US_STATE Simulates the device being located in a US state with specific privacy regulations (e.g., California).
102+
* @property DEBUG_GEOGRAPHY_OTHER Simulates the device being located in a region not covered by the other specific debug geographies.
103103
*/
104104
public enum class DebugGeography {
105105
DEBUG_GEOGRAPHY_DISABLED,

basic-ads/src/commonMain/kotlin/app/lexilabs/basic/ads/InterstitialAdHandler.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ import androidx.annotation.MainThread
3434
* ad.show()
3535
* ```
3636
*
37+
* @property state The current [AdState] of the interstitial ad.
3738
* @see load
3839
* @see setListeners
3940
* @see show

basic-ads/src/commonMain/kotlin/app/lexilabs/basic/ads/RequestConfiguration.kt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,27 @@ public data class RequestConfiguration(
3737
}
3838

3939
public companion object {
40+
/** Indicates that the child-directed status is not specified. */
4041
public const val TAG_FOR_CHILD_DIRECTED_TREATMENT_UNSPECIFIED: Int = -1
42+
/** Indicates that the app is not child-directed. */
4143
public const val TAG_FOR_CHILD_DIRECTED_TREATMENT_FALSE: Int = 0
44+
/** Indicates that the app is child-directed. */
4245
public const val TAG_FOR_CHILD_DIRECTED_TREATMENT_TRUE: Int = 1
46+
/** Indicates that the user is under the age of consent. */
4347
public const val TAG_FOR_UNDER_AGE_OF_CONSENT_TRUE: Int = 1
48+
/** Indicates that the user is not under the age of consent. */
4449
public const val TAG_FOR_UNDER_AGE_OF_CONSENT_FALSE: Int = 0
50+
/** Indicates that the under-age-of-consent status is not specified. */
4551
public const val TAG_FOR_UNDER_AGE_OF_CONSENT_UNSPECIFIED: Int = -1
52+
/** Indicates that the maximum ad content rating is not specified. */
4653
public const val MAX_AD_CONTENT_RATING_UNSPECIFIED: String = ""
54+
/** Content suitable for all audiences. */
4755
public const val MAX_AD_CONTENT_RATING_G: String = "G"
56+
/** Content suitable for most audiences with parental guidance. */
4857
public const val MAX_AD_CONTENT_RATING_PG: String = "PG"
58+
/** Content suitable for teen and older audiences. */
4959
public const val MAX_AD_CONTENT_RATING_T: String = "T"
60+
/** Content suitable only for mature audiences. */
5061
public const val MAX_AD_CONTENT_RATING_MA: String = "MA"
5162

5263
}

basic-ads/src/commonMain/kotlin/app/lexilabs/basic/ads/RewardItem.kt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
package app.lexilabs.basic.ads
22

3+
/**
4+
* Represents a reward that the user can earn.
5+
*
6+
* @property amount The amount of the reward.
7+
* @property type The type of the reward.
8+
*/
39
public expect class RewardItem {
10+
/** The amount of the reward. */
411
public val amount: Int
12+
/** The type of the reward. */
513
public val type: String
614
}
7-

basic-ads/src/commonMain/kotlin/app/lexilabs/basic/ads/RewardedAdHandler.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ package app.lexilabs.basic.ads
3232
* ad.show()
3333
* ```
3434
*
35+
* @property state The current [AdState] of the rewarded ad.
3536
* @see load
3637
* @see setListeners
3738
* @see show

basic-ads/src/commonMain/kotlin/app/lexilabs/basic/ads/RewardedInterstitialAdHandler.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ package app.lexilabs.basic.ads
3232
* ad.show()
3333
* ```
3434
*
35+
* @property state The current [AdState] of the rewarded interstitial ad.
3536
* @see load
3637
* @see setListeners
3738
* @see show

0 commit comments

Comments
 (0)