https://github.com/arjunrao87/epl-schedule
Nifty utility to help retrieve schedules for your favorite EPL team
https://github.com/arjunrao87/epl-schedule
epl javascript match soccer
Last synced: 12 months ago
JSON representation
Nifty utility to help retrieve schedules for your favorite EPL team
- Host: GitHub
- URL: https://github.com/arjunrao87/epl-schedule
- Owner: arjunrao87
- License: other
- Created: 2018-04-08T20:44:34.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-04-24T11:35:57.000Z (about 8 years ago)
- Last Synced: 2025-03-14T08:30:46.813Z (over 1 year ago)
- Topics: epl, javascript, match, soccer
- Language: JavaScript
- Size: 36.1 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# EPL Schedule
Prints out the EPL schedule for the current month with some East Coast specific details
| Team | Opponent | Date | Local Time | EST | Day |
| :-------------: |:-------------:| :-----:|:-----:|:-----:|:-----:|
| Manchester United | Manchester City | 07.04.2018 |16:30|11:30| Saturday
| Manchester United | West Brom | 15.04.2018 |15:00|10:00| Sunday
| Manchester United | Arsenal | 29.04.2018 |15:30|10:30| Sunday
# Usage
## As Fastify server
```bash
yarn run prod
```
Server runs at :3000 and can be requested with a GET request
```
http://localhost:3000/?team=9260&startDate=23APR2018&endDate=30APR2018
```
## As Node script
```bash
yarn run dev
```
- For team-id, refer to team-ids.js ( MANDATORY parameter )
- schedule-start-date format is DDMMMYYYY ( e.g. 23APR2018 ) ( OPTIONAL parameter. Defaults to start date of current month)
- schedule-end-date format is DDMMMYYYY ( e.g. 25APR2018 ) ( OPTIONAL parameter. Defaults to end date of current month)
e.g.
```
yarn run dev 9260 01APR2018 30APR2018
yarn run dev 9260
```
# Notifications
## Email
If the environment variable EMAIL_ENABLED=true then email notification with the schedule will be sent to the assigned email address. [Mailgun](https://www.mailgun.com/) is being used to send emails. A few other environment variables need to be set to enable the email functionality to work :
```bash
EMAIL_ENABLED=true
FROM_EMAIL=
TO_EMAIL=
EMAIL_DOMAIN=
MAILGUN_API_KEY=
```
## Note
This program uses an API given by ```https://football-api.com/```. If you wish to clone the project and work on it, make sure to set the env var OAUTH_KEY with the token provided by the API website.
```bash
OAUTH_KEY=
```
# Building and Running Docker image
## Build
```
docker build -t /epl-schedule .
```
## Run
```
docker run -p 49161:3000 /epl-schedule
```
# Motivation 🏅
Ever since I moved to the US, I have been unable to keep track of the English Premier League which is something I used to watch a lot back home. This is v1 of trying to keep me abreast of the EPL schedule for my team ( Manchester United ) ⚽️ 🥅
The goal ( teehee ) of this is not to give me up to the minute scores of games or keep me actively plugged in but to give me an idea of when games take place so I can atleast attempt to watch them.
# Possible Future enhancements
- Have this run periodically and send me updates on a monthly or weekly basis ( emails/sms etc )
- Have this configured for a users team so it can send schedules for their specific team
- Add channels/media to watch the game
- Reminders to watch the game