NAME
Sport::Analytics::NHL::Report::BS - Class for the Boxscore JSON report
SYNOPSYS
Class for the Boxscore JSON report.
use Sport::Analytics::NHL::Report::BS;
my $report = Sport::Analytics::NHL::Report::BS->new($json)
$report->process();
METHODS
new
-
Create the Boxscore object with the JSON.
process
-
Process the Boxscore into the object compatible with further processing, etc.
assign_specific_event_data
-
Assign specific event data
Arguments: * the event hashref we're building * the original event from the JSON Returns: void.
assign_specific_goal_data
-
Assign specific goal event data
Arguments: * the goal event hashref we're building * the original goal event from the JSON Returns: void.
assign_specific_penalty_data
-
Assign specific penalty event data
Arguments: * the penalty event hashref we're building * the original penalty event from the JSON Returns: void.
check_broken
-
Checks if the event is marked as 'BROKEN' and assigns default values to it.
Arguments: * the event hashref we're building * the original event from the JSON Returns: void.
Note: should probably be replaced with fill_broken from the Tools package.
fix_old_goalie
-
Fixes the goalie scored upon in the goal events of old boxscores (pre-1987).
Arguments: the goal event Returns: void.
fix_servedby
-
Fixes the served by data in a penalty event, when a bench or coach penalty is assigned in error to a player.
Arguments: the event Returns: void.
place_players
-
Assigns the player1, player2 and servedby players in a variety of events
Arguments: * the event hashref we're building * the original event from the JSON Returns: void.
set_broken_player
-
Marks a player entry in the boxscore as a broken one beyond repair
Arguments: the player hashref Returns: void.
set_events
-
Converts the events as specified in the boxscore JSON into the $boxscore->{events} arrayref with adjusted fields.
Arguments: the JSON events Returns: void.
set_extra_header_data
-
Sets some extra header data not handled by any explicit methods: status, location, shootout data etc. Arguments: the boxscore JSON hashref Returns: void.
set_id_data
-
Sets the game id data: the season, the stage, the season ID, and the overall 9-digit id.
Arguments: the ID field of the boxscore JSON Returns: void.
set_officials
-
Sets the officials for the game.
Arguments: the officials' section in the boxscore JSON hashref Returns: void.
set_periods
-
Set the game periods data from the boxscore JSON hashref
Arguments: the boxscore JSON hashref Returns: void.
set_player
-
Sets the player in a team roster from the boxscore JSON hashref in accordance with our data model.
Arguments: the player live data entry from the boxscore JSON hashref Returns: void.
set_stars
-
Parses the game stars. Not in use.
set_teams
-
Sets the team data and the team rosters from the boxscore JSON hashref in accordance with our data model.
Arguments: the boxscore JSON hashref Returns: void.
set_timestamps
-
Sets the start, end and last updated timestamps for the game from the date strings in the JSON
Argument: the boxscore JSON hashref Returns: void.
build_resolve_cache
-
Builds a resolution cache for the roster, with keys as numbers of players pointing at their whole player record in the game. The players who are not numbered are stored as reference to their record in a special list [names].
Arguments: none Returns: void. Sets $self->{resolve_cache}
Note: the caches are per team, and valid for one game only.
AUTHOR
More Hockey Stats, <contact at morehockeystats.com>
BUGS
Please report any bugs or feature requests to contact at morehockeystats.com
, or through the web interface at https://rt.cpan.org/NoAuth/ReportBug.html?Queue=Sport::Analytics::NHL::Report::BS. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Sport::Analytics::NHL::Report::BS
You can also look for information at:
RT: CPAN's request tracker (report bugs here)
https://rt.cpan.org/NoAuth/Bugs.html?Dist=Sport::Analytics::NHL::Report::BS
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
https://cpanratings.perl.org/d/Sport::Analytics::NHL::Report::BS
Search CPAN
https://metacpan.org/release/Sport::Analytics::NHL::Report::BS