Source code for nhlscrapi.games.plays

from nhlscrapi._tools import build_enum
  
Strength = build_enum('Even', 'PP', 'SH')
"""Enum indicating play strength."""

class Play(object):
    """Contains base level of state info about a given play"""
[docs] def __init__(self): self.play_num = 0 """Number of player who made the play""" self.period = 0 """Current period""" self.strength = Strength.Even """Enum indicating either even strength, shorthanded, or power play""" self.time = { "min": 20, "sec": 0 } """Time remaining in the period""" self.vis_on_ice = { } """All players on the visiting team on the ice at the time. ``{ num: [position, name] }``""" self.home_on_ice = { } """All players on the home team on the ice at the time. ``{ num: [position, name] }``""" self.event = None """ An object that inherits from :py:class:`.Event` that contains other specifics related to the given type of play """