cfbd 5.0.0-alpha.0 → 5.0.16-alpha.0
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/.github/FUNDING.yml +1 -0
- package/.github/workflows/npm-publish.yml +30 -0
- package/README.md +82 -0
- package/cfbd-5.0.16-alpha.0.tgz +0 -0
- package/dist/schemas.gen.d.ts +1 -3
- package/dist/schemas.gen.js +3 -5
- package/dist/services.gen.js +1 -1
- package/package.json +15 -1
- package/src/schemas.gen.ts +3 -5
- package/src/services.gen.ts +1 -1
- package/cfbd-5.0.0-alpha.0.tgz +0 -0
- package/dist/src/index.d.ts +0 -3
- package/dist/src/index.js +0 -20
- package/dist/src/schemas.gen.d.ts +0 -4722
- package/dist/src/schemas.gen.js +0 -4750
- package/dist/src/services.gen.d.ts +0 -215
- package/dist/src/services.gen.js +0 -442
- package/dist/src/types.gen.d.ts +0 -2323
- package/dist/src/types.gen.js +0 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
patreon: collegefootballdata
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
name: Upload TypeScript Package
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
deploy:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
permissions:
|
|
12
|
+
id-token: write
|
|
13
|
+
steps:
|
|
14
|
+
- name: Checkout repo
|
|
15
|
+
uses: actions/checkout@v4
|
|
16
|
+
- name: Setup Node.js
|
|
17
|
+
uses: actions/setup-node@v4
|
|
18
|
+
with:
|
|
19
|
+
node-version: 'lts/*'
|
|
20
|
+
registry-url: 'https://registry.npmjs.org'
|
|
21
|
+
- name: Install dependencies
|
|
22
|
+
run: yarn install --frozen-lockfile
|
|
23
|
+
- name: Build and package
|
|
24
|
+
run: |
|
|
25
|
+
yarn build
|
|
26
|
+
npm pack
|
|
27
|
+
- name: Publish to npm
|
|
28
|
+
run: npm publish --provenance
|
|
29
|
+
env:
|
|
30
|
+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|
package/README.md
CHANGED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# cfbd
|
|
2
|
+
This API is in limited Beta for Patreon subscribers. It may have bugs and is subject to changes. API keys can be acquired from the CollegeFootballData.com website.
|
|
3
|
+
|
|
4
|
+
This TypeScript package is automatically generated by the [Hey API](https://heyapi.vercel.app/) project:
|
|
5
|
+
|
|
6
|
+
- API version: 5.0.10
|
|
7
|
+
- Package version: 5.0.10-alpha.0
|
|
8
|
+
|
|
9
|
+
## Requirements.
|
|
10
|
+
|
|
11
|
+
Node 18+
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
### npm install
|
|
15
|
+
|
|
16
|
+
```sh
|
|
17
|
+
npm install cfbd
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
### yarn install
|
|
21
|
+
|
|
22
|
+
```sh
|
|
23
|
+
yarn add cfbd
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### pnpm install
|
|
27
|
+
|
|
28
|
+
```sh
|
|
29
|
+
pnpm add cfbd
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Usage
|
|
33
|
+
|
|
34
|
+
### Authorization
|
|
35
|
+
|
|
36
|
+
To authorize requests, use the `setConfig` method to set the `Authorization` header using your personal API key. API keys can be acquired from the CollegeFootballData.com website.
|
|
37
|
+
|
|
38
|
+
```typescript
|
|
39
|
+
import { client } from 'cfbd';
|
|
40
|
+
|
|
41
|
+
client.setConfig({
|
|
42
|
+
headers: {
|
|
43
|
+
'Authorization': 'Bearer YOUR_API_KEY',
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Example Usage
|
|
50
|
+
|
|
51
|
+
All API operations can be imported from the `cfbd` package and used as shown below.
|
|
52
|
+
|
|
53
|
+
```typescript
|
|
54
|
+
import { client, getGames } from 'cfbd';
|
|
55
|
+
|
|
56
|
+
// Set up the client with your API key
|
|
57
|
+
client.setConfig({
|
|
58
|
+
headers: {
|
|
59
|
+
'Authorization': 'Bearer YOUR_API_KEY',
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
// Call the getGames endpoint
|
|
64
|
+
const games = await getGames({
|
|
65
|
+
query: {
|
|
66
|
+
year: 2023,
|
|
67
|
+
classification: 'fbs',
|
|
68
|
+
},
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
for (const game of games.data ?? []) {
|
|
72
|
+
// Do something with the game data
|
|
73
|
+
// For example:
|
|
74
|
+
console.log(`${game.awayTeam} vs ${game.homeTeam} - ${game.excitementIndex}`);
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Author
|
|
79
|
+
|
|
80
|
+
admin@collegefootballdata.com
|
|
81
|
+
|
|
82
|
+
|
|
Binary file
|
package/dist/schemas.gen.d.ts
CHANGED
|
@@ -3303,7 +3303,6 @@ export declare const $Game: {
|
|
|
3303
3303
|
};
|
|
3304
3304
|
readonly type: "array";
|
|
3305
3305
|
readonly nullable: true;
|
|
3306
|
-
readonly minItems: 4;
|
|
3307
3306
|
};
|
|
3308
3307
|
readonly homePostgameWinProbability: {
|
|
3309
3308
|
readonly type: "number";
|
|
@@ -3349,7 +3348,6 @@ export declare const $Game: {
|
|
|
3349
3348
|
};
|
|
3350
3349
|
readonly type: "array";
|
|
3351
3350
|
readonly nullable: true;
|
|
3352
|
-
readonly minItems: 4;
|
|
3353
3351
|
};
|
|
3354
3352
|
readonly awayPostgameWinProbability: {
|
|
3355
3353
|
readonly type: "number";
|
|
@@ -4305,7 +4303,7 @@ export declare const $Coach: {
|
|
|
4305
4303
|
};
|
|
4306
4304
|
readonly hireDate: {
|
|
4307
4305
|
readonly type: "string";
|
|
4308
|
-
readonly format: "date";
|
|
4306
|
+
readonly format: "date-time";
|
|
4309
4307
|
readonly nullable: true;
|
|
4310
4308
|
};
|
|
4311
4309
|
readonly seasons: {
|
package/dist/schemas.gen.js
CHANGED
|
@@ -3322,8 +3322,7 @@ exports.$Game = {
|
|
|
3322
3322
|
format: 'double'
|
|
3323
3323
|
},
|
|
3324
3324
|
type: 'array',
|
|
3325
|
-
nullable: true
|
|
3326
|
-
minItems: 4
|
|
3325
|
+
nullable: true
|
|
3327
3326
|
},
|
|
3328
3327
|
homePostgameWinProbability: {
|
|
3329
3328
|
type: 'number',
|
|
@@ -3370,8 +3369,7 @@ exports.$Game = {
|
|
|
3370
3369
|
format: 'double'
|
|
3371
3370
|
},
|
|
3372
3371
|
type: 'array',
|
|
3373
|
-
nullable: true
|
|
3374
|
-
minItems: 4
|
|
3372
|
+
nullable: true
|
|
3375
3373
|
},
|
|
3376
3374
|
awayPostgameWinProbability: {
|
|
3377
3375
|
type: 'number',
|
|
@@ -4333,7 +4331,7 @@ exports.$Coach = {
|
|
|
4333
4331
|
},
|
|
4334
4332
|
hireDate: {
|
|
4335
4333
|
type: 'string',
|
|
4336
|
-
format: 'date',
|
|
4334
|
+
format: 'date-time',
|
|
4337
4335
|
nullable: true
|
|
4338
4336
|
},
|
|
4339
4337
|
seasons: {
|
package/dist/services.gen.js
CHANGED
|
@@ -15,7 +15,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
15
15
|
exports.getDraftTeams = exports.getDrives = exports.getScoreboard = exports.getCalendar = exports.getRecords = exports.getWeather = exports.getMedia = exports.getGamePlayerStats = exports.getGameTeamStats = exports.getGames = exports.getLines = exports.getLivePlays = exports.getFieldGoalExpectedPoints = exports.getPregameWinProbabilities = exports.getWinProbability = exports.getPredictedPointsAddedByPlayerSeason = exports.getPredictedPointsAddedByPlayerGame = exports.getPredictedPointsAddedByGame = exports.getPredictedPointsAddedByTeam = exports.getPredictedPoints = exports.getTransferPortal = exports.getReturningProduction = exports.getPlayerUsage = exports.searchPlayers = exports.getPlayStatTypes = exports.getPlayStats = exports.getPlayTypes = exports.getPlays = exports.getRankings = exports.getFpi = exports.getElo = exports.getSrs = exports.getConferenceSp = exports.getSp = exports.getAggregatedTeamRecruitingRatings = exports.getTeamRecruitingRankings = exports.getRecruits = exports.getAdvancedGameStats = exports.getAdvancedSeasonStats = exports.getCategories = exports.getTeamStats = exports.getPlayerSeasonStats = exports.getVenues = exports.getTalent = exports.getConferences = exports.getRoster = exports.getMatchup = exports.getFbsTeams = exports.getTeams = exports.client = void 0;
|
|
16
16
|
exports.getAdvancedBoxScore = exports.getCoaches = exports.getDraftPicks = exports.getDraftPositions = void 0;
|
|
17
17
|
var client_fetch_1 = require("@hey-api/client-fetch");
|
|
18
|
-
exports.client = (0, client_fetch_1.createClient)((0, client_fetch_1.createConfig)());
|
|
18
|
+
exports.client = (0, client_fetch_1.createClient)((0, client_fetch_1.createConfig)({ baseUrl: 'https://apinext.collegefootballdata.com' }));
|
|
19
19
|
/**
|
|
20
20
|
* Retrieves team information
|
|
21
21
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cfbd",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.16-alpha.0",
|
|
4
|
+
"description": "This API is in limited Beta for Patreon subscribers. It may have bugs and is subject to changes. API keys can be acquired from the CollegeFootballData.com website.",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/CFBD/cfbd-typescript.git"
|
|
8
|
+
},
|
|
9
|
+
"author": "BlueSCar",
|
|
10
|
+
"keywords": [
|
|
11
|
+
"football",
|
|
12
|
+
"cfb",
|
|
13
|
+
"ncaaf",
|
|
14
|
+
"data",
|
|
15
|
+
"statistics"
|
|
16
|
+
],
|
|
4
17
|
"main": "dist/index.js",
|
|
5
18
|
"types": "dist/index.d.ts",
|
|
6
19
|
"scripts": {
|
|
@@ -11,6 +24,7 @@
|
|
|
11
24
|
"@hey-api/client-fetch": "^0.2.4"
|
|
12
25
|
},
|
|
13
26
|
"devDependencies": {
|
|
27
|
+
"@hey-api/openapi-ts": "^0.52.9",
|
|
14
28
|
"@types/node": "^22.5.0",
|
|
15
29
|
"typescript": "^5.5.4"
|
|
16
30
|
}
|
package/src/schemas.gen.ts
CHANGED
|
@@ -3368,8 +3368,7 @@ export const $Game = {
|
|
|
3368
3368
|
format: 'double'
|
|
3369
3369
|
},
|
|
3370
3370
|
type: 'array',
|
|
3371
|
-
nullable: true
|
|
3372
|
-
minItems: 4
|
|
3371
|
+
nullable: true
|
|
3373
3372
|
},
|
|
3374
3373
|
homePostgameWinProbability: {
|
|
3375
3374
|
type: 'number',
|
|
@@ -3416,8 +3415,7 @@ export const $Game = {
|
|
|
3416
3415
|
format: 'double'
|
|
3417
3416
|
},
|
|
3418
3417
|
type: 'array',
|
|
3419
|
-
nullable: true
|
|
3420
|
-
minItems: 4
|
|
3418
|
+
nullable: true
|
|
3421
3419
|
},
|
|
3422
3420
|
awayPostgameWinProbability: {
|
|
3423
3421
|
type: 'number',
|
|
@@ -4401,7 +4399,7 @@ export const $Coach = {
|
|
|
4401
4399
|
},
|
|
4402
4400
|
hireDate: {
|
|
4403
4401
|
type: 'string',
|
|
4404
|
-
format: 'date',
|
|
4402
|
+
format: 'date-time',
|
|
4405
4403
|
nullable: true
|
|
4406
4404
|
},
|
|
4407
4405
|
seasons: {
|
package/src/services.gen.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { createClient, createConfig, type Options } from '@hey-api/client-fetch';
|
|
4
4
|
import type { GetTeamsData, GetTeamsError, GetTeamsResponse, GetFbsTeamsData, GetFbsTeamsError, GetFbsTeamsResponse, GetMatchupData, GetMatchupError, GetMatchupResponse, GetRosterData, GetRosterError, GetRosterResponse, GetConferencesError, GetConferencesResponse, GetTalentData, GetTalentError, GetTalentResponse, GetVenuesError, GetVenuesResponse, GetPlayerSeasonStatsData, GetPlayerSeasonStatsError, GetPlayerSeasonStatsResponse, GetTeamStatsData, GetTeamStatsError, GetTeamStatsResponse, GetCategoriesError, GetCategoriesResponse, GetAdvancedSeasonStatsData, GetAdvancedSeasonStatsError, GetAdvancedSeasonStatsResponse, GetAdvancedGameStatsData, GetAdvancedGameStatsError, GetAdvancedGameStatsResponse, GetRecruitsData, GetRecruitsError, GetRecruitsResponse, GetTeamRecruitingRankingsData, GetTeamRecruitingRankingsError, GetTeamRecruitingRankingsResponse, GetAggregatedTeamRecruitingRatingsData, GetAggregatedTeamRecruitingRatingsError, GetAggregatedTeamRecruitingRatingsResponse, GetSpData, GetSpError, GetSpResponse, GetConferenceSpData, GetConferenceSpError, GetConferenceSpResponse, GetSrsData, GetSrsError, GetSrsResponse, GetEloData, GetEloError, GetEloResponse, GetFpiData, GetFpiError, GetFpiResponse, GetRankingsData, GetRankingsError, GetRankingsResponse, GetPlaysData, GetPlaysError, GetPlaysResponse, GetPlayTypesError, GetPlayTypesResponse, GetPlayStatsData, GetPlayStatsError, GetPlayStatsResponse, GetPlayStatTypesError, GetPlayStatTypesResponse, SearchPlayersData, SearchPlayersError, SearchPlayersResponse, GetPlayerUsageData, GetPlayerUsageError, GetPlayerUsageResponse, GetReturningProductionData, GetReturningProductionError, GetReturningProductionResponse, GetTransferPortalData, GetTransferPortalError, GetTransferPortalResponse, GetPredictedPointsData, GetPredictedPointsError, GetPredictedPointsResponse, GetPredictedPointsAddedByTeamData, GetPredictedPointsAddedByTeamError, GetPredictedPointsAddedByTeamResponse, GetPredictedPointsAddedByGameData, GetPredictedPointsAddedByGameError, GetPredictedPointsAddedByGameResponse, GetPredictedPointsAddedByPlayerGameData, GetPredictedPointsAddedByPlayerGameError, GetPredictedPointsAddedByPlayerGameResponse, GetPredictedPointsAddedByPlayerSeasonData, GetPredictedPointsAddedByPlayerSeasonError, GetPredictedPointsAddedByPlayerSeasonResponse, GetWinProbabilityData, GetWinProbabilityError, GetWinProbabilityResponse, GetPregameWinProbabilitiesData, GetPregameWinProbabilitiesError, GetPregameWinProbabilitiesResponse, GetFieldGoalExpectedPointsError, GetFieldGoalExpectedPointsResponse, GetLivePlaysData, GetLivePlaysError, GetLivePlaysResponse, GetLinesData, GetLinesError, GetLinesResponse, GetGamesData, GetGamesError, GetGamesResponse, GetGameTeamStatsData, GetGameTeamStatsError, GetGameTeamStatsResponse, GetGamePlayerStatsData, GetGamePlayerStatsError, GetGamePlayerStatsResponse, GetMediaData, GetMediaError, GetMediaResponse, GetWeatherData, GetWeatherError, GetWeatherResponse, GetRecordsData, GetRecordsError, GetRecordsResponse, GetCalendarData, GetCalendarError, GetCalendarResponse, GetScoreboardData, GetScoreboardError, GetScoreboardResponse, GetDrivesData, GetDrivesError, GetDrivesResponse, GetDraftTeamsError, GetDraftTeamsResponse, GetDraftPositionsError, GetDraftPositionsResponse, GetDraftPicksData, GetDraftPicksError, GetDraftPicksResponse, GetCoachesData, GetCoachesError, GetCoachesResponse, GetAdvancedBoxScoreData, GetAdvancedBoxScoreError, GetAdvancedBoxScoreResponse } from './types.gen';
|
|
5
5
|
|
|
6
|
-
export const client = createClient(createConfig());
|
|
6
|
+
export const client = createClient(createConfig({ baseUrl: 'https://apinext.collegefootballdata.com' }));
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Retrieves team information
|
package/cfbd-5.0.0-alpha.0.tgz
DELETED
|
Binary file
|
package/dist/src/index.d.ts
DELETED
package/dist/src/index.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
// This file is auto-generated by @hey-api/openapi-ts
|
|
18
|
-
__exportStar(require("./schemas.gen"), exports);
|
|
19
|
-
__exportStar(require("./services.gen"), exports);
|
|
20
|
-
__exportStar(require("./types.gen"), exports);
|