@time2win/t2w 1.4.8 → 1.4.10

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