Copyright © (C) 2011 InakaLabs SRL
Behaviours: application.
Authors: Fernando Benavides (fernando.benavides@inakanetworks.com).
data() = {home, team()} | {home_players, [player()]} | {home_score, non_neg_integer()} | {visit, team()} | {visit_players, [player()]} | {visit_score, non_neg_integer()} | {period, period()} | {start_time, datetime()} | {team, team()} | {player_team, team()} | {player, player()} | {player_out, player()} | {player_in, player()} | {card, red | yellow} | {comment, binary()}
date() = {2000..3000, 1..12, 1..31}
event() = #match_stream_event{}
event_kind() = status | start | stop | halftime_start | halftime_stop | extratime | shot | save | goal | corner | goalkick | offside | foul | penalty | freekick | card | substitution | throwin
match() = #match_stream_match{}
match_id() = binary()
period() = not_started | first | last | halftime | first_extra | halftime_extra | last_extra | ended
player() = {pos_integer(), binary()}
Number and name
team() = binary()
time() = {0..23, 0..59, 0..59}
user() = #match_stream_user{}
user_id() = binary()
cancel_match/1 | Cancels a match. |
cancel_match/3 | Cancels a match. |
history/1 | List of match events. |
history/3 | List of match events. |
match/1 | List of available matches. |
matches/0 | List of available matches. |
new_match/3 | Registers a match. |
register_event/3 | Something happened in a match. |
register_event/5 | Something happened in a match. |
start/0 | Starts the application. |
stop/0 | Stops the application. |
timestamp/0 | now in milliseconds. |
cancel_match(MatchId::match_id()) -> ok
Cancels a match
Cancels a match
history(MatchId::match_id()) -> [event()]
List of match events
List of match events
match(MatchId::match_id()) -> not_found | match_stream:match()
List of available matches
matches() -> [match_id()]
List of available matches
new_match(Home::team(), Visit::team(), StartDate::date()) -> {ok, match_id()} | {error, {duplicated, match_id()}}
Registers a match
register_event(MatchId::match_id(), Kind::event_kind(), Data::[{atom(), binary()}]) -> ok
Something happened in a match
register_event(Home::team(), Visit::team(), StartDate::date(), Kind::event_kind(), Data::[{atom(), binary()}]) -> ok
Something happened in a match
start() -> ok | {error, {already_started, match_stream}}
Starts the application
stop() -> ok
Stops the application
timestamp() -> pos_integer()
now in milliseconds
Generated by EDoc, Sep 21 2011, 16:21:48.