@time2win/t2w 1.4.11 → 1.4.12
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/CHANGELOG.md +88 -84
- package/README.md +23 -23
- package/index.d.ts +17 -17
- package/index.js +386 -386
- package/models.d.ts +270 -253
- package/models.js +21 -2
- package/package.json +29 -29
- package/test.d.ts +1 -0
- package/test.js +7 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,84 +1,88 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
|
|
5
|
-
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
-
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
-
|
|
8
|
-
## 1.4.
|
|
9
|
-
###
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
## 1.4.
|
|
13
|
-
###
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
## 1.4.
|
|
17
|
-
### Modified
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
## 1.4.
|
|
21
|
-
### Modified
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
## 1.4.
|
|
25
|
-
### Modified
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
## 1.4.
|
|
29
|
-
### Modified
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
## 1.4.
|
|
33
|
-
### Modified
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
## 1.4.
|
|
37
|
-
### Modified
|
|
38
|
-
Calculation of ```racenumNumeric``` to support more cases
|
|
39
|
-
|
|
40
|
-
## 1.4.
|
|
41
|
-
### Modified
|
|
42
|
-
Calculation of ```racenumNumeric``` to
|
|
43
|
-
|
|
44
|
-
## 1.4.
|
|
45
|
-
### Modified
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
## 1.4.
|
|
49
|
-
### Modified
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
## 1.4.
|
|
53
|
-
###
|
|
54
|
-
property ```racenumNumeric```
|
|
55
|
-
|
|
56
|
-
## 1.
|
|
57
|
-
###
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
## 1.
|
|
61
|
-
###
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
## 1.2.
|
|
65
|
-
###
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
## 1.
|
|
69
|
-
###
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
###
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
###
|
|
84
|
-
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## 1.4.12 - 2024-09-19
|
|
9
|
+
### Added
|
|
10
|
+
RaceStatus enum
|
|
11
|
+
|
|
12
|
+
## 1.4.11 - 2024-09-11
|
|
13
|
+
### Removed
|
|
14
|
+
age calculation for participant infos - this is temporary to decrease requests
|
|
15
|
+
|
|
16
|
+
## 1.4.10 - 2024-08-04
|
|
17
|
+
### Modified
|
|
18
|
+
added readonly pageSize field to t2w package and set it to 250 for all requests
|
|
19
|
+
|
|
20
|
+
## 1.4.9 - 2024-06-14
|
|
21
|
+
### Modified
|
|
22
|
+
```dataExtra``` parameters to support types, therefore selection is improved and prevents typos
|
|
23
|
+
|
|
24
|
+
## 1.4.8 - 2024-03-29
|
|
25
|
+
### Modified
|
|
26
|
+
```reg_type``` field of ```T2WEventRace``` to type ```'individual' | 'team'
|
|
27
|
+
|
|
28
|
+
## 1.4.7 - 2024-03-25
|
|
29
|
+
### Modified
|
|
30
|
+
Gender type of ```T2WIndividualResult``` to ```M | F | U```
|
|
31
|
+
|
|
32
|
+
## 1.4.6 - 2024-02-28
|
|
33
|
+
### Modified
|
|
34
|
+
Error handling for methods, if api is not allowed, the error message will be more specific
|
|
35
|
+
|
|
36
|
+
## 1.4.5 - 2024-02-15
|
|
37
|
+
### Modified
|
|
38
|
+
Calculation of ```racenumNumeric``` to support more cases
|
|
39
|
+
|
|
40
|
+
## 1.4.4 - 2024-02-15
|
|
41
|
+
### Modified
|
|
42
|
+
Calculation of ```racenumNumeric``` to support more cases
|
|
43
|
+
|
|
44
|
+
## 1.4.3 - 2024-02-14
|
|
45
|
+
### Modified
|
|
46
|
+
Calculation of ```racenumNumeric``` to use always the first part before a dash (if available)
|
|
47
|
+
|
|
48
|
+
## 1.4.2 - 2024-02-14
|
|
49
|
+
### Modified
|
|
50
|
+
```getTeamsWithMembers()``` and ```getParticipantInfos()``` now have raceId as optional parameter (if not set, all races will be requested)
|
|
51
|
+
|
|
52
|
+
## 1.4.1 - 2024-02-14
|
|
53
|
+
### Modified
|
|
54
|
+
property ```racenumNumeric``` and ```racenum``` to be nullable for all occurrences
|
|
55
|
+
|
|
56
|
+
## 1.4.0 - 2024-02-09
|
|
57
|
+
### Added
|
|
58
|
+
property ```racenumNumeric``` now available in ```T2WIndividualResult```, ```T2WTeamResult```, ```T2WParticipantInfo```, ```T2WTeam```, ```T2WTeamMember``` interface
|
|
59
|
+
|
|
60
|
+
## 1.3.0 - 2024-02-07
|
|
61
|
+
### Modified
|
|
62
|
+
parameter order of all methods to have page at the end (enhances usability)
|
|
63
|
+
|
|
64
|
+
## 1.2.1 - 2024-02-07
|
|
65
|
+
### Added
|
|
66
|
+
```T2WIndividualResultSplit``` interface for Split details of individual results
|
|
67
|
+
|
|
68
|
+
## 1.2.0 - 2024-02-06
|
|
69
|
+
### Modified
|
|
70
|
+
```T2WParticipantInfo``` interface has now status properties
|
|
71
|
+
|
|
72
|
+
## 1.1.0 - 2024-02-06
|
|
73
|
+
### Added
|
|
74
|
+
```getUpcomingEvents()``` method
|
|
75
|
+
|
|
76
|
+
### Removed
|
|
77
|
+
```T2WEventData``` interface (was duplicate of ```T2WEvent```)
|
|
78
|
+
|
|
79
|
+
## 1.0.1 - 2023-10-25
|
|
80
|
+
### Added
|
|
81
|
+
Keywords in package.json
|
|
82
|
+
|
|
83
|
+
### Modified
|
|
84
|
+
Requirements for NodeJS and TS
|
|
85
|
+
|
|
86
|
+
## 1.0.0 - 2023-10-25
|
|
87
|
+
### Added
|
|
88
|
+
Latest of T2W API and running production ready version
|
package/README.md
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
# @time2win/t2w
|
|
2
|
-
providing latest-state models and advanced methods to interact with the T2W API.
|
|
3
|
-
Models are included per default and can be imported directly from the package.
|
|
4
|
-
|
|
5
|
-
## Requirements
|
|
6
|
-
NodeJS >= 18.x \
|
|
7
|
-
Typescript >= 4.x
|
|
8
|
-
|
|
9
|
-
## Usage
|
|
10
|
-
|
|
11
|
-
### Install Package
|
|
12
|
-
```bash
|
|
13
|
-
npm install @time2win/t2w
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
### Import Package
|
|
17
|
-
```js
|
|
18
|
-
import Time2WinAPI from '@time2win/t2w';
|
|
19
|
-
import { T2WEvent } from '@time2win/t2w/models';
|
|
20
|
-
|
|
21
|
-
const api = new Time2WinAPI('YOUR-API-KEY');
|
|
22
|
-
```
|
|
23
|
-
|
|
1
|
+
# @time2win/t2w
|
|
2
|
+
providing latest-state models and advanced methods to interact with the T2W API.
|
|
3
|
+
Models are included per default and can be imported directly from the package.
|
|
4
|
+
|
|
5
|
+
## Requirements
|
|
6
|
+
NodeJS >= 18.x \
|
|
7
|
+
Typescript >= 4.x
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
### Install Package
|
|
12
|
+
```bash
|
|
13
|
+
npm install @time2win/t2w
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
### Import Package
|
|
17
|
+
```js
|
|
18
|
+
import Time2WinAPI from '@time2win/t2w';
|
|
19
|
+
import { T2WEvent } from '@time2win/t2w/models';
|
|
20
|
+
|
|
21
|
+
const api = new Time2WinAPI('YOUR-API-KEY');
|
|
22
|
+
```
|
|
23
|
+
|
package/index.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { T2WEvent, T2WEventResponse, T2WIndividualResultResponse, T2WParticipantResponse, T2WTeamResponse, T2WTeamResultsResponse } from './models';
|
|
2
|
-
export default class Time2WinAPI {
|
|
3
|
-
private readonly apiUrl;
|
|
4
|
-
private readonly apiKey;
|
|
5
|
-
private readonly pageSize;
|
|
6
|
-
constructor(apiKey: string);
|
|
7
|
-
getEventData(eventId: number, dataExtra?: ('prices' | 'splits')[]): Promise<T2WEvent>;
|
|
8
|
-
getTeamResult(eventId: number, raceId: number, dataExtra?: ('splits' | 'attributes' | 'laps')[], teamType?: 'M' | 'F' | 'U', page?: number): Promise<T2WTeamResultsResponse>;
|
|
9
|
-
getTeamsWithMembers(eventId: number, raceId?: number, dataExtra?: ('teammembers' | 'attributes')[], page?: number): Promise<T2WTeamResponse>;
|
|
10
|
-
getIndividualResults(eventId: number, raceId: number, dataExtra?: ('splits' | 'laps' | 'positions' | 'attributes')[], gender?: 'M' | 'F' | 'U', page?: number): Promise<T2WIndividualResultResponse>;
|
|
11
|
-
getParticipantInfos(eventId: number, raceId?: number, dataExtra?: ('order' | 'attributes' | 'categories' | 'uci_id' | 'chip_code' | 'externalticket' | 'contactinfo')[], gender?: 'M' | 'F' | 'U', page?: number): Promise<T2WParticipantResponse>;
|
|
12
|
-
getUpcomingEvents(from?: Date, to?: Date, page?: number): Promise<T2WEventResponse>;
|
|
13
|
-
private getUrl;
|
|
14
|
-
private calculateAge;
|
|
15
|
-
private formatDate;
|
|
16
|
-
private getNumericBib;
|
|
17
|
-
}
|
|
1
|
+
import { T2WEvent, T2WEventResponse, T2WIndividualResultResponse, T2WParticipantResponse, T2WTeamResponse, T2WTeamResultsResponse } from './models';
|
|
2
|
+
export default class Time2WinAPI {
|
|
3
|
+
private readonly apiUrl;
|
|
4
|
+
private readonly apiKey;
|
|
5
|
+
private readonly pageSize;
|
|
6
|
+
constructor(apiKey: string);
|
|
7
|
+
getEventData(eventId: number, dataExtra?: ('prices' | 'splits')[]): Promise<T2WEvent>;
|
|
8
|
+
getTeamResult(eventId: number, raceId: number, dataExtra?: ('splits' | 'attributes' | 'laps')[], teamType?: 'M' | 'F' | 'U', page?: number): Promise<T2WTeamResultsResponse>;
|
|
9
|
+
getTeamsWithMembers(eventId: number, raceId?: number, dataExtra?: ('teammembers' | 'attributes')[], page?: number): Promise<T2WTeamResponse>;
|
|
10
|
+
getIndividualResults(eventId: number, raceId: number, dataExtra?: ('splits' | 'laps' | 'positions' | 'attributes')[], gender?: 'M' | 'F' | 'U', page?: number): Promise<T2WIndividualResultResponse>;
|
|
11
|
+
getParticipantInfos(eventId: number, raceId?: number, dataExtra?: ('order' | 'attributes' | 'categories' | 'uci_id' | 'chip_code' | 'externalticket' | 'contactinfo')[], gender?: 'M' | 'F' | 'U', page?: number): Promise<T2WParticipantResponse>;
|
|
12
|
+
getUpcomingEvents(from?: Date, to?: Date, page?: number): Promise<T2WEventResponse>;
|
|
13
|
+
private getUrl;
|
|
14
|
+
private calculateAge;
|
|
15
|
+
private formatDate;
|
|
16
|
+
private getNumericBib;
|
|
17
|
+
}
|