@vixoniccom/footbal-score 1.4.2 → 1.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env +1 -1
- package/CHANGELOG.md +2 -0
- package/package.json +1 -1
- package/src/helpers/getFixture.ts +8 -3
package/.env
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
FOOTBALL_API_KEY=
|
|
1
|
+
FOOTBALL_API_KEY=932ef9439de2eb39756b44e7ff8338d8
|
|
2
2
|
FOOTBALL_API_HOST=api-football-v1.p.rapidapi.com
|
|
3
3
|
FOOTBALL_API_URL=https://v3.football.api-sports.io/fixtures
|
|
4
4
|
RESULTS_FLAG_IMG=https://storage.googleapis.com/vixoniccom-emails/results_flags/0000.png
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [1.4.3](https://github.com/Vixonic/store-football-score/compare/v1.4.2...v1.4.3) (2026-06-15)
|
|
6
|
+
|
|
5
7
|
### [1.4.2](https://github.com/Vixonic/store-football-score/compare/v1.4.2-dev.0...v1.4.2) (2026-06-13)
|
|
6
8
|
|
|
7
9
|
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@ const FOOTBALL_API_HOST = process.env.FOOTBALL_API_HOST
|
|
|
9
9
|
const FOOTBALL_API_URL = process.env.FOOTBALL_API_URL
|
|
10
10
|
const MILLISECONDS_PER_DAY = 24 * 60 * 60 * 1000
|
|
11
11
|
|
|
12
|
-
const USE_MOCK =
|
|
12
|
+
const USE_MOCK = true
|
|
13
13
|
|
|
14
14
|
export const getFixture = async (league: string, yesterday?: boolean, tomorrow?: boolean) => {
|
|
15
15
|
if (USE_MOCK) return mockFixtures
|
|
@@ -27,6 +27,11 @@ export const getFixture = async (league: string, yesterday?: boolean, tomorrow?:
|
|
|
27
27
|
headers: { 'X-RapidAPI-Key': FOOTBALL_API_KEY, 'X-RapidAPI-Host': FOOTBALL_API_HOST },
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
try {
|
|
31
|
+
const response = await axios.request(options)
|
|
32
|
+
return response.data.response
|
|
33
|
+
} catch (error) {
|
|
34
|
+
console.error(error)
|
|
35
|
+
return []
|
|
36
|
+
}
|
|
32
37
|
}
|