Sport::Analytics::NHL::Report::BS - Class for the Boxscore JSON report
Class for the Boxscore JSON report.
use Sport::Analytics::NHL::Report::BS; my $report = Sport::Analytics::NHL::Report::BS->new($json) $report->process();
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.
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
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.
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.
More Hockey Stats, <contact at morehockeystats.com>
<contact at morehockeystats.com>
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.
contact at morehockeystats.com
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
http://annocpan.org/dist/Sport::Analytics::NHL::Report::BS
CPAN Ratings
https://cpanratings.perl.org/d/Sport::Analytics::NHL::Report::BS
Search CPAN
https://metacpan.org/release/Sport::Analytics::NHL::Report::BS
To install Sport::Analytics::NHL, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Sport::Analytics::NHL
CPAN shell
perl -MCPAN -e shell install Sport::Analytics::NHL
For more information on module installation, please visit the detailed CPAN module installation guide.