@time2win/t2w 1.4.12 → 1.4.14

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 CHANGED
@@ -1,88 +1,96 @@
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
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.14 - 2024-10-14
9
+ ### Changed
10
+ type of ```category_id``` of ```T2WParticipantInfo``` to ```number | null```
11
+
12
+ ## 1.4.13 - 2024-10-02
13
+ ### Added
14
+ undefined check for body.list ```getIndividualResults()```
15
+
16
+ ## 1.4.12 - 2024-09-19
17
+ ### Added
18
+ RaceStatus enum
19
+
20
+ ## 1.4.11 - 2024-09-11
21
+ ### Removed
22
+ age calculation for participant infos - this is temporary to decrease requests
23
+
24
+ ## 1.4.10 - 2024-08-04
25
+ ### Modified
26
+ added readonly pageSize field to t2w package and set it to 250 for all requests
27
+
28
+ ## 1.4.9 - 2024-06-14
29
+ ### Modified
30
+ ```dataExtra``` parameters to support types, therefore selection is improved and prevents typos
31
+
32
+ ## 1.4.8 - 2024-03-29
33
+ ### Modified
34
+ ```reg_type``` field of ```T2WEventRace``` to type ```'individual' | 'team'
35
+
36
+ ## 1.4.7 - 2024-03-25
37
+ ### Modified
38
+ Gender type of ```T2WIndividualResult``` to ```M | F | U```
39
+
40
+ ## 1.4.6 - 2024-02-28
41
+ ### Modified
42
+ Error handling for methods, if api is not allowed, the error message will be more specific
43
+
44
+ ## 1.4.5 - 2024-02-15
45
+ ### Modified
46
+ Calculation of ```racenumNumeric``` to support more cases
47
+
48
+ ## 1.4.4 - 2024-02-15
49
+ ### Modified
50
+ Calculation of ```racenumNumeric``` to support more cases
51
+
52
+ ## 1.4.3 - 2024-02-14
53
+ ### Modified
54
+ Calculation of ```racenumNumeric``` to use always the first part before a dash (if available)
55
+
56
+ ## 1.4.2 - 2024-02-14
57
+ ### Modified
58
+ ```getTeamsWithMembers()``` and ```getParticipantInfos()``` now have raceId as optional parameter (if not set, all races will be requested)
59
+
60
+ ## 1.4.1 - 2024-02-14
61
+ ### Modified
62
+ property ```racenumNumeric``` and ```racenum``` to be nullable for all occurrences
63
+
64
+ ## 1.4.0 - 2024-02-09
65
+ ### Added
66
+ property ```racenumNumeric``` now available in ```T2WIndividualResult```, ```T2WTeamResult```, ```T2WParticipantInfo```, ```T2WTeam```, ```T2WTeamMember``` interface
67
+
68
+ ## 1.3.0 - 2024-02-07
69
+ ### Modified
70
+ parameter order of all methods to have page at the end (enhances usability)
71
+
72
+ ## 1.2.1 - 2024-02-07
73
+ ### Added
74
+ ```T2WIndividualResultSplit``` interface for Split details of individual results
75
+
76
+ ## 1.2.0 - 2024-02-06
77
+ ### Modified
78
+ ```T2WParticipantInfo``` interface has now status properties
79
+
80
+ ## 1.1.0 - 2024-02-06
81
+ ### Added
82
+ ```getUpcomingEvents()``` method
83
+
84
+ ### Removed
85
+ ```T2WEventData``` interface (was duplicate of ```T2WEvent```)
86
+
87
+ ## 1.0.1 - 2023-10-25
88
+ ### Added
89
+ Keywords in package.json
90
+
91
+ ### Modified
92
+ Requirements for NodeJS and TS
93
+
94
+ ## 1.0.0 - 2023-10-25
95
+ ### Added
96
+ 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
+ }