Entities
if(oddsChange.getEvent() instanceof Match){
Match match = (Match) oddsChange.getEvent();
EventTimeline eventTimeline = match.getEventTimeline(Locale.ENGLISH);
if (match.getEventTimelineIfPresent(Locale.ENGLISH).isPresent()) {
logger.info("scoreHistory: ");
for (TimelineEvent timelineEvent : eventTimeline.getTimelineEvents()) {
logger.info("scoreHistory Entry (id): " + timelineEvent.getId());
logger.info("scoreHistory Entry (sequenceNo): --------");
logger.info("scoreHistory Entry (matchTime): " + timelineEvent.getMatchClock());
logger.info("scoreHistory Entry (player): " + timelineEvent.getPlayer().getName(Locale.ENGLISH));
logger.info("scoreHistory Entry (scoringTeam): " + timelineEvent.getTeam());
logger.info("scoreHistory Entry (Score Home): " + timelineEvent.getHomeScore());
logger.info("scoreHistory Entry (Score Away): " + timelineEvent.getAwayScore());
logger.info("scoreHistory Entry (canceled): " + timelineEvent.getMatchStatusCode());
}
}
}if (oddsChange.GetOddsChange().Event is IMatch match){
var eventTimeline = match.GetEventTimelineAsync().GetAwaiter().GetResult();
if (eventTimeline != null)
{
_log.LogInformation("scoreHistory: ");
foreach (var timelineEvent in eventTimeline.TimelineEvents)
{
_log.LogInformation("scoreHistory Entry (id): " + timelineEvent.Id);
_log.LogInformation("scoreHistory Entry (sequenceNo): --------");
_log.LogInformation("scoreHistory Entry (matchTime): " + timelineEvent.MatchClock);
_log.LogInformation("scoreHistory Entry (player): " + timelineEvent.Player.GetName(_defaultCulture));
_log.LogInformation("scoreHistory Entry (scoringTeam): " + timelineEvent.Team);
_log.LogInformation("scoreHistory Entry (Score Home): " + timelineEvent.HomeScore);
_log.LogInformation("scoreHistory Entry (Score Away): " + timelineEvent.AwayScore);
_log.LogInformation("scoreHistory Entry (canceled): " + timelineEvent.MatchStatusCode);
}
}
}Last updated
Was this helpful?