npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

fantasy-hockey-notifier-cdk

v2.0.63

Published

AWS CDK construct to send notifications for adds, drops, and trades in an ESPN Fantasy Hockey league

Downloads

2,784

Readme

Fantasy Hockey Notifier CDK

AWS CDK construct to send notifications for adds, drops, and trades in an ESPN Fantasy Hockey league

NPM version PyPI version Release

This application checks for and sends notifications about adds, drops, and trades in an ESPN Fantasy Hockey league. All ESPN APIs used are unofficial and undocumented, thus this application may break at some point in the future if ESPN changes the response schema for any of the endpoints. The codebase supports local execution, along with deployment to AWS using AWS CDK.

Local Execution

In addition to being consumable as a CDK construct (which is the primary use-case), the project supports local execution for testing purposes.

Prerequisites for Local Execution

  • Node.js 14 or later
  • See the Environment Variables section for a list of required and optional variables that should be exported in the shell or set in the .env file
  • If using any of the environment variables starting with AWS_ or ending with _SSM, you must configure AWS credentials via a local credentials file or environment variables. See the AWS documentation for details.

Shell Commands for Local Execution

npm ci
npm start

API Reference

See API.md.

Environment Variables

Required Variables

FH_SEASON or FH_SEASON_SSM: The year of the fantasy hockey season (i.e. 2020 for the 2019-2020 season)

FH_LEAGUE_ID or FH_LEAGUE_ID_SSM: The ID of the ESPN fantasy hockey league (this is displayed in the URL when you go to the My Team page) or the path for an SSM parameter with this value (SSM variable takes prescedence if both are specified)

ESPN_S2_COOKIE or ESPN_S2_COOKIE_SSM: The value of your espn_s2 cookie to be used for authentication (you can find this by examining stored cookies for espn.com using the Chrome or Firefox developer tools) or the path for an SSM parameter with this value (SSM variable takes prescedence if both are specified)

Optional Variables

AWS_SNS_TOPIC_ARN: The ARN of an existing AWS SNS topic

AWS_DYNAMO_DB_TABLE_NAME or DISCORD_WEBHOOK_SSM: The name of an existing Dynamo DB table to use for storing last run dates (takes priority over LAST_RUN_FILE_PATH if both are set) or the path for an SSM parameter with this value (SSM variable takes prescedence if both are specified)

DISCORD_WEBHOOK: A Discord webhook URL

LAST_RUN_FILE_PATH: A local file path to use for storing last run dates (defaults to .lastrun)

EARLIEST_DATE: A unix timestamp in milliseconds to use as the earliest date when looking up transactions

LATEST_DATE: A unix timestamp in milliseconds to use as the latest date when looking up transactions

License

This project is licensed under the MIT License - see the LICENSE file for details