cfbd 5.0.0-alpha.0 → 5.0.15-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.15-alpha.0.tgz +0 -0
- package/dist/schemas.gen.d.ts +1 -1
- package/dist/schemas.gen.js +1 -1
- package/dist/services.gen.js +1 -1
- package/package.json +15 -1
- package/src/schemas.gen.ts +1 -1
- 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
package/dist/schemas.gen.js
CHANGED
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.15-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
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);
|