@bp1222/stats-api 0.0.3 → 0.0.6

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.
@@ -0,0 +1,24 @@
1
+ name: Publish Package to npmjs
2
+ on:
3
+ release:
4
+ types: [published]
5
+ jobs:
6
+ build:
7
+ runs-on: ubuntu-latest
8
+ permissions:
9
+ contents: read
10
+ id-token: write
11
+ steps:
12
+ - uses: actions/checkout@v4
13
+
14
+ # Setup .npmrc file to publish to npm
15
+ - uses: actions/setup-node@v4
16
+ with:
17
+ node-version: '20.x'
18
+ registry-url: 'https://registry.npmjs.org'
19
+
20
+ - run: npm install
21
+
22
+ - run: npm publish --provenance --access public
23
+ env:
24
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_KEY }}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bp1222/stats-api",
3
- "version": "0.0.3",
3
+ "version": "0.0.6",
4
4
  "module": "dist/index.mjs",
5
5
  "types": "dist/index.d.ts",
6
6
  "repository": {
@@ -20,7 +20,7 @@ properties:
20
20
  dates:
21
21
  type: array
22
22
  items:
23
- title: MLBScheduleDays
23
+ title: MLBScheduleDay
24
24
  type: object
25
25
  required:
26
26
  - games
@@ -11,7 +11,7 @@ models/MLBLeagueDates.ts
11
11
  models/MLBLeagueRecord.ts
12
12
  models/MLBRecord.ts
13
13
  models/MLBSchedule.ts
14
- models/MLBScheduleDays.ts
14
+ models/MLBScheduleDay.ts
15
15
  models/MLBSeason.ts
16
16
  models/MLBSeasons.ts
17
17
  models/MLBSport.ts
@@ -13,12 +13,12 @@
13
13
  */
14
14
 
15
15
  import { mapValues } from '../runtime';
16
- import type { MLBScheduleDays } from './MLBScheduleDays';
16
+ import type { MLBScheduleDay } from './MLBScheduleDay';
17
17
  import {
18
- MLBScheduleDaysFromJSON,
19
- MLBScheduleDaysFromJSONTyped,
20
- MLBScheduleDaysToJSON,
21
- } from './MLBScheduleDays';
18
+ MLBScheduleDayFromJSON,
19
+ MLBScheduleDayFromJSONTyped,
20
+ MLBScheduleDayToJSON,
21
+ } from './MLBScheduleDay';
22
22
 
23
23
  /**
24
24
  * Schedule
@@ -53,10 +53,10 @@ export interface MLBSchedule {
53
53
  totalGamesInProgress: number;
54
54
  /**
55
55
  *
56
- * @type {Array<MLBScheduleDays>}
56
+ * @type {Array<MLBScheduleDay>}
57
57
  * @memberof MLBSchedule
58
58
  */
59
- dates: Array<MLBScheduleDays>;
59
+ dates: Array<MLBScheduleDay>;
60
60
  }
61
61
 
62
62
  /**
@@ -85,7 +85,7 @@ export function MLBScheduleFromJSONTyped(json: any, ignoreDiscriminator: boolean
85
85
  'totalEvents': json['totalEvents'],
86
86
  'totalGames': json['totalGames'],
87
87
  'totalGamesInProgress': json['totalGamesInProgress'],
88
- 'dates': ((json['dates'] as Array<any>).map(MLBScheduleDaysFromJSON)),
88
+ 'dates': ((json['dates'] as Array<any>).map(MLBScheduleDayFromJSON)),
89
89
  };
90
90
  }
91
91
 
@@ -99,7 +99,7 @@ export function MLBScheduleToJSON(value?: MLBSchedule | null): any {
99
99
  'totalEvents': value['totalEvents'],
100
100
  'totalGames': value['totalGames'],
101
101
  'totalGamesInProgress': value['totalGamesInProgress'],
102
- 'dates': ((value['dates'] as Array<any>).map(MLBScheduleDaysToJSON)),
102
+ 'dates': ((value['dates'] as Array<any>).map(MLBScheduleDayToJSON)),
103
103
  };
104
104
  }
105
105
 
@@ -0,0 +1,108 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * MLB StatAPI
5
+ * An spec API to consume the MLB Stat API
6
+ *
7
+ * The version of the OpenAPI document: 0.0.1
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ import type { MLBGame } from './MLBGame';
17
+ import {
18
+ MLBGameFromJSON,
19
+ MLBGameFromJSONTyped,
20
+ MLBGameToJSON,
21
+ } from './MLBGame';
22
+
23
+ /**
24
+ *
25
+ * @export
26
+ * @interface MLBScheduleDay
27
+ */
28
+ export interface MLBScheduleDay {
29
+ /**
30
+ *
31
+ * @type {string}
32
+ * @memberof MLBScheduleDay
33
+ */
34
+ date?: string;
35
+ /**
36
+ *
37
+ * @type {number}
38
+ * @memberof MLBScheduleDay
39
+ */
40
+ totalItems?: number;
41
+ /**
42
+ *
43
+ * @type {number}
44
+ * @memberof MLBScheduleDay
45
+ */
46
+ totalEvents?: number;
47
+ /**
48
+ *
49
+ * @type {number}
50
+ * @memberof MLBScheduleDay
51
+ */
52
+ totalGames?: number;
53
+ /**
54
+ *
55
+ * @type {number}
56
+ * @memberof MLBScheduleDay
57
+ */
58
+ totalGamesInProgress?: number;
59
+ /**
60
+ *
61
+ * @type {Array<MLBGame>}
62
+ * @memberof MLBScheduleDay
63
+ */
64
+ games: Array<MLBGame>;
65
+ }
66
+
67
+ /**
68
+ * Check if a given object implements the MLBScheduleDay interface.
69
+ */
70
+ export function instanceOfMLBScheduleDay(value: object): value is MLBScheduleDay {
71
+ if (!('games' in value) || value['games'] === undefined) return false;
72
+ return true;
73
+ }
74
+
75
+ export function MLBScheduleDayFromJSON(json: any): MLBScheduleDay {
76
+ return MLBScheduleDayFromJSONTyped(json, false);
77
+ }
78
+
79
+ export function MLBScheduleDayFromJSONTyped(json: any, ignoreDiscriminator: boolean): MLBScheduleDay {
80
+ if (json == null) {
81
+ return json;
82
+ }
83
+ return {
84
+
85
+ 'date': json['date'] == null ? undefined : json['date'],
86
+ 'totalItems': json['totalItems'] == null ? undefined : json['totalItems'],
87
+ 'totalEvents': json['totalEvents'] == null ? undefined : json['totalEvents'],
88
+ 'totalGames': json['totalGames'] == null ? undefined : json['totalGames'],
89
+ 'totalGamesInProgress': json['totalGamesInProgress'] == null ? undefined : json['totalGamesInProgress'],
90
+ 'games': ((json['games'] as Array<any>).map(MLBGameFromJSON)),
91
+ };
92
+ }
93
+
94
+ export function MLBScheduleDayToJSON(value?: MLBScheduleDay | null): any {
95
+ if (value == null) {
96
+ return value;
97
+ }
98
+ return {
99
+
100
+ 'date': value['date'],
101
+ 'totalItems': value['totalItems'],
102
+ 'totalEvents': value['totalEvents'],
103
+ 'totalGames': value['totalGames'],
104
+ 'totalGamesInProgress': value['totalGamesInProgress'],
105
+ 'games': ((value['games'] as Array<any>).map(MLBGameToJSON)),
106
+ };
107
+ }
108
+
@@ -10,7 +10,7 @@ export * from './MLBLeagueDates';
10
10
  export * from './MLBLeagueRecord';
11
11
  export * from './MLBRecord';
12
12
  export * from './MLBSchedule';
13
- export * from './MLBScheduleDays';
13
+ export * from './MLBScheduleDay';
14
14
  export * from './MLBSeason';
15
15
  export * from './MLBSeasons';
16
16
  export * from './MLBSport';