fantasy-hockey-notifier-cdk


Namefantasy-hockey-notifier-cdk JSON
Version 1.0.81 PyPI version JSON
download
home_pagehttps://github.com/ftalburt/fantasy-hockey-notifier-cdk.git#readme
SummaryAWS CDK construct to send notifications for adds, drops, and trades in an ESPN Fantasy Hockey league
upload_time2022-06-01 01:46:10
maintainer
docs_urlNone
authorForrest Talburt
requires_python~=3.7
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Fantasy Hockey Notifier CDK

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

[![NPM version](https://badge.fury.io/js/fantasy-hockey-notifier-cdk.svg)](https://badge.fury.io/js/fantasy-hockey-notifier-cdk)
[![PyPI version](https://badge.fury.io/py/fantasy-hockey-notifier-cdk.svg)](https://badge.fury.io/py/fantasy-hockey-notifier-cdk)
[![Release](https://github.com/ftalburt/fantasy-hockey-notifier-cdk/actions/workflows/release.yml/badge.svg)](https://github.com/ftalburt/fantasy-hockey-notifier-cdk/actions/workflows/release.yml)

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](https://aws.amazon.com/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](#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](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html) for details.

### Shell Commands for Local Execution

```sh
npm ci
npm start
```

## API Reference

See [API.md](./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](LICENSE) file for details



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ftalburt/fantasy-hockey-notifier-cdk.git#readme",
    "name": "fantasy-hockey-notifier-cdk",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "~=3.7",
    "maintainer_email": "",
    "keywords": "",
    "author": "Forrest Talburt",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/22/a8/bdbf4e311d4e55db8724681e8686114e427dcafdf0fe6051fc9a3535c0dd/fantasy-hockey-notifier-cdk-1.0.81.tar.gz",
    "platform": null,
    "description": "# Fantasy Hockey Notifier CDK\n\n> AWS CDK construct to send notifications for adds, drops, and trades in an ESPN Fantasy Hockey league\n\n[![NPM version](https://badge.fury.io/js/fantasy-hockey-notifier-cdk.svg)](https://badge.fury.io/js/fantasy-hockey-notifier-cdk)\n[![PyPI version](https://badge.fury.io/py/fantasy-hockey-notifier-cdk.svg)](https://badge.fury.io/py/fantasy-hockey-notifier-cdk)\n[![Release](https://github.com/ftalburt/fantasy-hockey-notifier-cdk/actions/workflows/release.yml/badge.svg)](https://github.com/ftalburt/fantasy-hockey-notifier-cdk/actions/workflows/release.yml)\n\nThis 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](https://aws.amazon.com/cdk).\n\n## Local Execution\n\nIn addition to being consumable as a CDK construct (which is the primary use-case), the project supports local execution for testing purposes.\n\n### Prerequisites for Local Execution\n\n* Node.js 14 or later\n* See the [Environment Variables](#environment-variables) section for a list of required and optional variables that should be exported in the shell or set in the .env file\n* 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](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html) for details.\n\n### Shell Commands for Local Execution\n\n```sh\nnpm ci\nnpm start\n```\n\n## API Reference\n\nSee [API.md](./API.md).\n\n## Environment Variables\n\n### Required Variables\n\n`FH_SEASON` or `FH_SEASON_SSM`: The year of the fantasy hockey season (i.e. `2020` for the 2019-2020 season)\n\n`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)\n\n`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)\n\n### Optional Variables\n\n`AWS_SNS_TOPIC_ARN`: The ARN of an existing AWS SNS topic\n\n`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)\n\n`DISCORD_WEBHOOK`: A Discord webhook URL\n\n`LAST_RUN_FILE_PATH`: A local file path to use for storing last run dates (defaults to `.lastrun`)\n\n`EARLIEST_DATE`: A unix timestamp in milliseconds to use as the earliest date when looking up transactions\n\n`LATEST_DATE`: A unix timestamp in milliseconds to use as the latest date when looking up transactions\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "AWS CDK construct to send notifications for adds, drops, and trades in an ESPN Fantasy Hockey league",
    "version": "1.0.81",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "448db3858dee3f740ec42fdc0d5f47bb",
                "sha256": "192669b33ae41df4f692b279f342148134ca2c28bba794d09d266cd4d6abac5a"
            },
            "downloads": -1,
            "filename": "fantasy_hockey_notifier_cdk-1.0.81-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "448db3858dee3f740ec42fdc0d5f47bb",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "~=3.7",
            "size": 31712241,
            "upload_time": "2022-06-01T01:46:07",
            "upload_time_iso_8601": "2022-06-01T01:46:07.260858Z",
            "url": "https://files.pythonhosted.org/packages/66/df/0e36932fad84399e9db8996bb3796b7155ecd965a36dd276659298659a8c/fantasy_hockey_notifier_cdk-1.0.81-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "f9cc127fe07a9ab47f6b921c279ea6d8",
                "sha256": "73cd3c2da114b1ac1443c773d7bcf7e2f15e4d12e8eb21e0e2b32a92a7ee31bf"
            },
            "downloads": -1,
            "filename": "fantasy-hockey-notifier-cdk-1.0.81.tar.gz",
            "has_sig": false,
            "md5_digest": "f9cc127fe07a9ab47f6b921c279ea6d8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "~=3.7",
            "size": 31713557,
            "upload_time": "2022-06-01T01:46:10",
            "upload_time_iso_8601": "2022-06-01T01:46:10.731000Z",
            "url": "https://files.pythonhosted.org/packages/22/a8/bdbf4e311d4e55db8724681e8686114e427dcafdf0fe6051fc9a3535c0dd/fantasy-hockey-notifier-cdk-1.0.81.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-06-01 01:46:10",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "ftalburt",
    "github_project": "fantasy-hockey-notifier-cdk.git#readme",
    "lcname": "fantasy-hockey-notifier-cdk"
}
        
Elapsed time: 0.49667s