@time2win/t2w 1.4.9 → 1.4.11

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,76 +1,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.9 - 2024-06-14
9
- ### Modified
10
- ```dataExtra``` parameters to support types, therefore selection is improved and prevents typos
11
-
12
- ## 1.4.8 - 2024-03-29
13
- ### Modified
14
- ```reg_type``` field of ```T2WEventRace``` to type ```'individual' | 'team'
15
-
16
- ## 1.4.7 - 2024-03-25
17
- ### Modified
18
- Gender type of ```T2WIndividualResult``` to ```M | F | U```
19
-
20
- ## 1.4.6 - 2024-02-28
21
- ### Modified
22
- Error handling for methods, if api is not allowed, the error message will be more specific
23
-
24
- ## 1.4.5 - 2024-02-15
25
- ### Modified
26
- Calculation of ```racenumNumeric``` to support more cases
27
-
28
- ## 1.4.4 - 2024-02-15
29
- ### Modified
30
- Calculation of ```racenumNumeric``` to support more cases
31
-
32
- ## 1.4.3 - 2024-02-14
33
- ### Modified
34
- Calculation of ```racenumNumeric``` to use always the first part before a dash (if available)
35
-
36
- ## 1.4.2 - 2024-02-14
37
- ### Modified
38
- ```getTeamsWithMembers()``` and ```getParticipantInfos()``` now have raceId as optional parameter (if not set, all races will be requested)
39
-
40
- ## 1.4.1 - 2024-02-14
41
- ### Modified
42
- property ```racenumNumeric``` and ```racenum``` to be nullable for all occurrences
43
-
44
- ## 1.4.0 - 2024-02-09
45
- ### Added
46
- property ```racenumNumeric``` now available in ```T2WIndividualResult```, ```T2WTeamResult```, ```T2WParticipantInfo```, ```T2WTeam```, ```T2WTeamMember``` interface
47
-
48
- ## 1.3.0 - 2024-02-07
49
- ### Modified
50
- parameter order of all methods to have page at the end (enhances usability)
51
-
52
- ## 1.2.1 - 2024-02-07
53
- ### Added
54
- ```T2WIndividualResultSplit``` interface for Split details of individual results
55
-
56
- ## 1.2.0 - 2024-02-06
57
- ### Modified
58
- ```T2WParticipantInfo``` interface has now status properties
59
-
60
- ## 1.1.0 - 2024-02-06
61
- ### Added
62
- ```getUpcomingEvents()``` method
63
-
64
- ### Removed
65
- ```T2WEventData``` interface (was duplicate of ```T2WEvent```)
66
-
67
- ## 1.0.1 - 2023-10-25
68
- ### Added
69
- Keywords in package.json
70
-
71
- ### Modified
72
- Requirements for NodeJS and TS
73
-
74
- ## 1.0.0 - 2023-10-25
75
- ### Added
76
- 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.11 - 2024-09-11
9
+ ### Removed
10
+ age calculation for participant infos - this is temporary to decrease requests
11
+
12
+ ## 1.4.10 - 2024-08-04
13
+ ### Modified
14
+ added readonly pageSize field to t2w package and set it to 250 for all requests
15
+
16
+ ## 1.4.9 - 2024-06-14
17
+ ### Modified
18
+ ```dataExtra``` parameters to support types, therefore selection is improved and prevents typos
19
+
20
+ ## 1.4.8 - 2024-03-29
21
+ ### Modified
22
+ ```reg_type``` field of ```T2WEventRace``` to type ```'individual' | 'team'
23
+
24
+ ## 1.4.7 - 2024-03-25
25
+ ### Modified
26
+ Gender type of ```T2WIndividualResult``` to ```M | F | U```
27
+
28
+ ## 1.4.6 - 2024-02-28
29
+ ### Modified
30
+ Error handling for methods, if api is not allowed, the error message will be more specific
31
+
32
+ ## 1.4.5 - 2024-02-15
33
+ ### Modified
34
+ Calculation of ```racenumNumeric``` to support more cases
35
+
36
+ ## 1.4.4 - 2024-02-15
37
+ ### Modified
38
+ Calculation of ```racenumNumeric``` to support more cases
39
+
40
+ ## 1.4.3 - 2024-02-14
41
+ ### Modified
42
+ Calculation of ```racenumNumeric``` to use always the first part before a dash (if available)
43
+
44
+ ## 1.4.2 - 2024-02-14
45
+ ### Modified
46
+ ```getTeamsWithMembers()``` and ```getParticipantInfos()``` now have raceId as optional parameter (if not set, all races will be requested)
47
+
48
+ ## 1.4.1 - 2024-02-14
49
+ ### Modified
50
+ property ```racenumNumeric``` and ```racenum``` to be nullable for all occurrences
51
+
52
+ ## 1.4.0 - 2024-02-09
53
+ ### Added
54
+ property ```racenumNumeric``` now available in ```T2WIndividualResult```, ```T2WTeamResult```, ```T2WParticipantInfo```, ```T2WTeam```, ```T2WTeamMember``` interface
55
+
56
+ ## 1.3.0 - 2024-02-07
57
+ ### Modified
58
+ parameter order of all methods to have page at the end (enhances usability)
59
+
60
+ ## 1.2.1 - 2024-02-07
61
+ ### Added
62
+ ```T2WIndividualResultSplit``` interface for Split details of individual results
63
+
64
+ ## 1.2.0 - 2024-02-06
65
+ ### Modified
66
+ ```T2WParticipantInfo``` interface has now status properties
67
+
68
+ ## 1.1.0 - 2024-02-06
69
+ ### Added
70
+ ```getUpcomingEvents()``` method
71
+
72
+ ### Removed
73
+ ```T2WEventData``` interface (was duplicate of ```T2WEvent```)
74
+
75
+ ## 1.0.1 - 2023-10-25
76
+ ### Added
77
+ Keywords in package.json
78
+
79
+ ### Modified
80
+ Requirements for NodeJS and TS
81
+
82
+ ## 1.0.0 - 2023-10-25
83
+ ### Added
84
+ 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,16 +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
- constructor(apiKey: string);
6
- getEventData(eventId: number, dataExtra?: ('prices' | 'splits')[]): Promise<T2WEvent>;
7
- getTeamResult(eventId: number, raceId: number, dataExtra?: ('splits' | 'attributes' | 'laps')[], teamType?: 'M' | 'F' | 'U', page?: number): Promise<T2WTeamResultsResponse>;
8
- getTeamsWithMembers(eventId: number, raceId?: number, dataExtra?: ('teammembers' | 'attributes')[], page?: number): Promise<T2WTeamResponse>;
9
- getIndividualResults(eventId: number, raceId: number, dataExtra?: ('splits' | 'laps' | 'positions' | 'attributes')[], gender?: 'M' | 'F' | 'U', page?: number): Promise<T2WIndividualResultResponse>;
10
- getParticipantInfos(eventId: number, raceId?: number, dataExtra?: ('order' | 'attributes' | 'categories' | 'uci_id' | 'chip_code' | 'externalticket' | 'contactinfo')[], gender?: 'M' | 'F' | 'U', page?: number): Promise<T2WParticipantResponse>;
11
- getUpcomingEvents(from?: Date, to?: Date, page?: number): Promise<T2WEventResponse>;
12
- private getUrl;
13
- private calculateAge;
14
- private formatDate;
15
- private getNumericBib;
16
- }
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
+ }