-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Return JSON string format initialize response (#133)
- Loading branch information
1 parent
09dc7c7
commit c0215ec
Showing
4 changed files
with
43 additions
and
1 deletion.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
src/main/java/com/statsig/androidsdk/ExternalInitializeResponse.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package com.statsig.androidsdk | ||
|
||
/** | ||
* A helper class for interfacing with Initialize Response currently being used in the Statsig console | ||
*/ | ||
class ExternalInitializeResponse( | ||
private val values: String?, | ||
private val evaluationDetails: EvaluationDetails, | ||
) { | ||
internal companion object { | ||
fun getUninitialized(): ExternalInitializeResponse { | ||
return ExternalInitializeResponse(null, EvaluationDetails(EvaluationReason.Uninitialized)) | ||
} | ||
} | ||
fun getInitializeResponseJSON(): String? { | ||
return values | ||
} | ||
|
||
fun getEvaluationDetails(): EvaluationDetails { | ||
return evaluationDetails.copy() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters