Skip to content

Commit

Permalink
fix: type of getLivescore, export sort order
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikMichelson committed Jun 25, 2024
1 parent a8d8b29 commit 100ba97
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const matches = await getMatches({
## Methods
For the results of the methods, check the typings [here](https://github.com/ErikMichelson/uefa-api/blob/HEAD/src/api.d.ts).

### `getLivescore(): Livescore`
### `getLivescore(): Livescore[]`
Returns the score of currently running matches as well as information about upcoming matches in the next hour as well as
finished matches in the last hour.

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "uefa-api",
"version": "1.0.1",
"version": "1.0.2",
"description": "Typescript bindings and utils for the UEFA APIs",
"license": "MIT",
"keywords": [
Expand Down
6 changes: 3 additions & 3 deletions src/helpers/livescore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import { performApiRequest } from '../utils'
* Fetches the current livescore from the API.
* This includes upcoming matches in the near time, live matches and recent matches from the last hours.
*
* @returns A promise that resolves with the current livescore.
* @returns A promise that resolves with an array of the current livescores.
*/
export const getLivescore = (): Promise<Livescore> => {
return performApiRequest<Livescore>(apiLivescore, {})
export const getLivescore = (): Promise<Livescore[]> => {
return performApiRequest<Livescore[]>(apiLivescore, {})
}
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,4 @@ export { getPlayers } from './helpers/players'
export { getStandings } from './helpers/standings'
export { getTeams } from './helpers/teams'
export { getCompetitions } from './helpers/competitions'
export { SortOrder } from './helpers/matches'

0 comments on commit 100ba97

Please sign in to comment.