Closed tyiuhc closed 7 months ago
On PR summary comment you mention that we could do Assignment::toJSONPayload or Assignment::toJSONString but this methods are not static so I guess that we should do something like:
$assignment = new Assignment($user,$variants,$apiKey);
$assignment->toJSONString();
Is this correct?
On PR summary comment you mention that we could do Assignment::toJSONPayload or Assignment::toJSONString but this methods are not static so I guess that we should do something like:
$assignment = new Assignment($user,$variants,$apiKey); $assignment->toJSONString();
Is this correct?
Yes, that is correct.
:tada: This PR is included in version 0.5.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:
Summary
AssignmentTrackingProvider interface
AssignmentConfig
to send assignment events from local evaluations to Amplitudetrack
method takes in an Assignment object, which represents an assignment eventAssignment::toJSONPayload
can be used to convert an Assignment to a JSON string representation of the payload required to send an event to AmplitudeAssignment::toJSONString
can be used to convert an Assignment to a JSON string representation of an assignment event - this is equivalent to an object in theevents
array in the payloadDefaultAssignmentTrackingProvider
Refactors
minIdLength
(minimum permitted length foruser_id
anddevice_id
fields for assignment event) added toAssignmentConfig
logger
added toAmplitudeConfig
instead of being passed viaLocaEvaluationClient
toEvent
moved fromAssignmentService
toAssignment