Skip to content

Commit

Permalink
Add footy-report extension (#9881)
Browse files Browse the repository at this point in the history
* Add footy-report extension

- Merge pull request #22 from thuoe/next
- Merge pull request #21 from thuoe/docs/2023-12-26-changelog
- docs: update changelog
- Merge pull request #20 from thuoe/feature/thu-33-redesign-test-api-command
- docs: update screenshots
- chore: delete unused assets
- feat: action to open ext preferences
- feat: use form to test API access token
- Merge pull request #19 from thuoe/bugfix/fetch-teams
- fix: optional position name
- Merge pull request #2 from thuoe/feature/thu-15-raycast-create-search-command
- Merge pull request #10 from thuoe/feature/thu-26-create-command-screenshots
- docs: include command screenshots in README.md
- docs: player stats screenshot
- docs: team list screenshot
- docs: update team details & API screenshots
- docs: delete outdated screenshots
- docs: create command screenshots
- Merge pull request #17 from thuoe/bugfix/type-errors
- build: include build step during CI pipeline
- fix: type error fetch teams hook
- fix: type error command arg
- fix: type errors for fetching fixtures
- fix: type erros from player stats
- fix: 2d array type further improvements
- fix: array type
- fix: multidimensional array type
- Merge pull request #18 from thuoe/feature/unit-tests
- build: test step to ci job
- test: create markdown from 2d array
- test: grouping obj
- test: format & select fields
- build: install jest
- Merge pull request #16 from thuoe/feature/thu-32-search-command-create-readme
- docs: add missing command subheading
- docs: create README.md template
- Merge pull request #15 from thuoe/feature/thu-29-player-markdown-season-stats
- feat: include yellow/red card stats
- refactor: set/filter events
- fix: map player id
- feat: fetch player stats across seasons for teams
- feat: create markdown table function
- Merge remote-tracking branch \'origin/next\' into feature/thu-15-raycast-create-search-command
- Merge pull request #14 from thuoe/chore/gh-actions-ci
- build: provide extension description
- refactor: ci pipeline
- Merge remote-tracking branch \'origin/next\' into feature/thu-15-raycast-create-search-command
- Merge pull request #13 from thuoe/feature/thu-28-create-extension-icon
- feat: create extension icon
- feat: create argument to search by team name
- feat: group squad by positions in grid view
- feat: create grouping function
- feat: create simple grid view for squad players
- feat: map tvstations to fixture calendar events
- feat: provide calendar name preference
- feat: wrap action in confirmation alert
- feat: create calendar event action for upcoming fixtures
- feat: icon for player details action button
- feat: introduce limit across fixture list items
- feat: populate upcoming fixtures list section
- fix: correct time range when fetching fixtures
- fix: rename fixture list category
- refactor: format fixture timestamp during response mapping
- feat: fetch latest fixtures and populate list items
- fix: correct squad subtitle count
- fix: populate title & placeholder with team name
- refactor: generic function to compute select fields
- fix: maximise player image size in markdown
- feat: create player details view
- feat: map player dob
- feat: restructure search command to search, favorite & display teams details
- feat: create new view for team details using dummy data
- build: create alias for shared types
- feat: create hook to fetch team with player info
- fix: invoke custom hook after change to path & provide execute flag
- refactor: rename search team command
- fix: prevent persisting dropdown value
- feat: create dropdown with team sections using dummy data
- feat(command): create search command template
- Merge pull request #12 from thuoe/chore/env-var-gh-actions
- chore: default env vars for gh actions
- chore: create basic ci pipeline (#11)
- Merge pull request #6 from thuoe/chore/local-dev-improvements
- fix: add missing package
- chore: format remaining files
- chore: update editorconfig
- chore: format code on save
- chore: create editorconfig file
- Merge pull request #5 from thuoe/feature/thu-23-create-preferences
- refactor: remove optional chaining
- refactor: create custom hook for API call
- feat: test API command
- chore: provide ESLint config (#4)
- Merge pull request #1 from thuoe/feature/thu-14-create-project-template
- feat: create simple command template
- Initial commit

* Update footy-report extension

- Merge pull request #26 from thuoe/next
- Merge pull request #25 from thuoe/bugfix/squad-details
- fix: map fixture id to item key
- fix: increase limit of squad players rendered in grid
- chore: remove console log
- fix: display age && render if dob provided
- fix: show seasons based on relevant team
- fix: filter season stats if no details found
- fix: render players without shirt no
- Merge pull request #23 from thuoe/main

* Update footy-report extension

- Merge pull request #29 from thuoe/next
- Merge pull request #28 from thuoe/feature/thu-34-error-handling-faulty-api-tokens
- fix: handle errors across views
- refactor: hooks response types
- fix: handle hook data responses if invalid token is found
- fix: provide error from promise hook
- feat: create error toast hook
- Merge pull request #27 from thuoe/main

* Update footy-report extension

- Merge pull request #32 from thuoe/next
- Merge pull request #31 from thuoe/feature/thu-35-api-test-command-validate-sportmonks-endpoint
- feat: validate endpoint before submit
- Merge pull request #30 from thuoe/main

* Update CHANGELOG.md and optimise images

---------

Co-authored-by: raycastbot <bot@raycast.com>
  • Loading branch information
thuoe and raycastbot authored Jan 12, 2024
1 parent fe9bea0 commit c489975
Show file tree
Hide file tree
Showing 35 changed files with 10,960 additions and 0 deletions.
7 changes: 7 additions & 0 deletions extensions/footy-report/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
root = true

[*]
charset = utf-8
insert_final_newline = true
indent_style = space
indent_size = 2
4 changes: 4 additions & 0 deletions extensions/footy-report/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"root": true,
"extends": ["@raycast"]
}
1 change: 1 addition & 0 deletions extensions/footy-report/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
7 changes: 7 additions & 0 deletions extensions/footy-report/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
}
10 changes: 10 additions & 0 deletions extensions/footy-report/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Footy Report Changelog

## [Initial Version] - 2023-12-26

- Create new `Search Team` command
- Create new `Test Endpoint` command
- Update README documentation
- Initial unit tests
- Enforce CI pipeline
- Initial Screenshots
21 changes: 21 additions & 0 deletions extensions/footy-report/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 Eddie Thuo

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
50 changes: 50 additions & 0 deletions extensions/footy-report/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<p align="center">
<img width=100 src="./assets/extension-icon.png">
</p>

<h1 align="center">Footy Report</h1>

<h3 align="center">
Raycast extension to find your essential football match day info and stats
</h3>

![Header](metadata/footy-report-1.png)

## ⚠️ Prerequisites

This extension leverages the [SportMonks Football API](https://www.sportmonks.com/football-api/) thus requires a valid API token to authenticate requests from a personal/organization account.
You can begin by registering an account under a free plan tier [here](https://my.sportmonks.com/login) to get things running!

> [!NOTE]
> Bear in mind under the free tier plan, you have limited access to the amount of leagues that can be requested.
## Commands

### Search Team

![Search Team](metadata/footy-report-3.png)

Search a football team by name and display all relevant data regarding recent results, upcoming fixtures and squad stats.

### Test API

![Test API](metadata/footy-report-6.png)

Trigger a simple API endpoint test using a SportsMonk API token to identify a successful response or not

### Search League Standings

🛠️ Under development

### Search League Stats

🛠️ Under development

## Preferences

All preferences can be customized through `Raycast Settings > Extensions > Footy Report`

| Name | Description | Default Value | Required |
| --------------- | ---------------------------------------------------------------------------- | ------------- | -------- |
| `API Key` | SportMonks API token used to fetch all relevant football data | | `true` |
| `Calendar Name` | Name of the calendar on Calendar.app you wish to save upcoming fixture dates | `Calendar` | `true` |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions extensions/footy-report/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
preset: "ts-jest",
testEnvironment: "node",
testMatch: ["**/*.test.ts"],
};
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit c489975

Please sign in to comment.