Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Straight red card type number #8

Closed
oltodo opened this issue Jun 20, 2018 · 3 comments
Closed

Straight red card type number #8

oltodo opened this issue Jun 20, 2018 · 3 comments

Comments

@oltodo
Copy link
Contributor

oltodo commented Jun 20, 2018

According the previous Colombia/Japan match, it seems the type number for the straight red card is 3 but not 4 like the following defines.

const EVENT_STRAIGHT_RED = 4; // Maybe?

Refer to the match's events :

https://api.fifa.com/api/v1/timelines/17/254645/275073/300331550?language=fr-FR&count=1

{
  "EventId": "-1011232931",
  "IdTeam": "43926",
  "IdPlayer": "280487",
  "IdSubPlayer": null,
  "Timestamp": "2018-06-19T12:03:58.871Z",
  "MatchMinute": "3'",
  "Period": 3,
  "HomeGoals": 0,
  "AwayGoals": 0,
  "Type": 3,
  "TypeLocalized": [],
  "PositionX": null,
  "PositionY": null,
  "GoalGatePositionX": null,
  "GoalGatePositionY": null,
  "GoalGatePositionZ": null,
  "VarDetail": null,
  "HomePenaltyGoals": 0,
  "AwayPenaltyGoals": 0
}
@j0k3r
Copy link
Owner

j0k3r commented Jun 20, 2018

You mean we need to switch these values?

const EVENT_SECOND_YELLOW_CARD_RED = 3; // Maybe?
const EVENT_STRAIGHT_RED = 4; // Maybe?

No matters the value, we handle them in the same way:
https://github.com/j0k3r/worldcup-slack-bot/blob/master/worldCupNotifier.php#L344-L349

@oltodo
Copy link
Contributor Author

oltodo commented Jun 20, 2018

I still don't know what is the EVENT_SECOND_YELLOW_CARD_RED value but yes, you can switch the values for now.
Indeed, it not changes anything in your case. So it was just for information. 😉

@oltodo
Copy link
Contributor Author

oltodo commented Jun 20, 2018

And you could remove the // Maybe? for the EVENT_STRAIGHT_RED constant.

@j0k3r j0k3r closed this as completed in 9eab8b5 Jun 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants