Code Monkey home page Code Monkey logo

hubot-hockey's Introduction

Hubot Hockey

npm version Node CI

Get the game results and the latest NHL playoff odds for the selected team from the very useful MoneyPuck.com.

Configuration

There is no additional configuration necessary if you simply wish to get the latest game results and playoff odds.

Environment Variable Required? Description
HUBOT_HOCKEY_EXT_STANDINGS No Adds columns to the standings table. See notes below.
HUBOT_HOCKEY_HIDE_ODDS No Skips show the odds from MoneyPuck
  • By default, the standings table will show Games Played, Wins, Losses, Overtime Losses, and Points.
  • Setting HUBOT_HOCKEY_EXT_STANDINGS to any truth-y value will add Points Percentage, Last 10, and Streak.

Adding to Your Hubot

See full instructions here.

  1. npm install hubot-hockey --save (updates your package.json file)
  2. Open the external-scripts.json file in the root directory (you may need to create this file) and add an entry to the array (e.g. [ 'hubot-hockey' ]).

Commands

  • hubot <team> - Show your team's current playoff odds and next game
  • hubot nhl - Show division leaders
  • hubot nhl [division|conference] - Show division or conference standings

hubot-hockey's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar stahnma avatar stephenyeargin avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

brittanydionigi

hubot-hockey's Issues

Diversify odds sources

  • MoneyPuck is good, but usually doesn't update until the next morning.
  • SportsClub stats is good, but updates sporadically -- sometimes right after the game, sometimes weeks later

In hockey-bot, we inspect the timestamp to determine whether to use the odds. Could do the same thing here, showing one or both. Note that this will slow down the odds response a bit as it reaches out for the data.

Spring Cleaning 2018

The following checklist is for all of the Hubot packages I maintain.

README.md

  • Badges (underneath title)
[![npm version](https://badge.fury.io/js/hubot-PACKAGE_NAME.svg)](http://badge.fury.io/js/hubot-PACKAGE_NAME) [![Build Status](https://travis-ci.org/stephenyeargin/hubot-PACKAGE_NAME.png)](https://travis-ci.org/stephenyeargin/hubot-PACKAGE_NAME)
  • Configuration options

package.json

  • author
  "author": "Stephen Yeargin <[email protected]>",
  • repository
  "repository": {
    "type": "git",
    "url": "git://github.com/stephenyeargin/hubot-PACKAGE_NAME.git"
  },
  • bugs
  "bugs": {
    "url": "https://github.com/stephenyeargin/hubot-PACKAGE_NAME/issues"
  },
  • peerDependencies
  "peerDependencies": {
    "hubot": ">=2 <10 || 0.0.0-development"
  },

Gruntfile.js

  • additionalFiles
        additionalFiles: ['package-lock.json']

.travis.yml

  • TravisCI configuration
language: node_js
sudo: false
notifications:
  email: false
node_js:
  - "8" # stable
  - "6" # LTS
  - "4" # maintenance
cache:
  directories:
- node_modules

Show clinch indicator in standings table

  • clinchIndicator is available in the feed, e.g. x, y, etc.
  • Stetch goal: calculate whether team is eliminated from contention
{Points} + (82 - {Games Played}) * 2 < {Total Points of Last wildcard team in conference})

Ignore tieb-reaking, assume best outcome.

Add points percentage to standings.

This matters when teams have played very different numbers of games (see OTT right now).

curl -L https://api-web.nhle.com/v1/standings/now | jq '.standings[] | "\(.teamName.default) -- \(.pointPctg)"'

Is part of the answer.

Handle the offseason better

From late April through the first of October, the script only reports the last result (as does the site). Instead, it should reply with the latest headline for the given team (or something of that nature).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.