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.
@@ -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
@@ -4305,7 +4305,7 @@ export declare const $Coach: {
4305
4305
  };
4306
4306
  readonly hireDate: {
4307
4307
  readonly type: "string";
4308
- readonly format: "date";
4308
+ readonly format: "date-time";
4309
4309
  readonly nullable: true;
4310
4310
  };
4311
4311
  readonly seasons: {
@@ -4333,7 +4333,7 @@ exports.$Coach = {
4333
4333
  },
4334
4334
  hireDate: {
4335
4335
  type: 'string',
4336
- format: 'date',
4336
+ format: 'date-time',
4337
4337
  nullable: true
4338
4338
  },
4339
4339
  seasons: {
@@ -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.0-alpha.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
  }
@@ -4401,7 +4401,7 @@ export const $Coach = {
4401
4401
  },
4402
4402
  hireDate: {
4403
4403
  type: 'string',
4404
- format: 'date',
4404
+ format: 'date-time',
4405
4405
  nullable: true
4406
4406
  },
4407
4407
  seasons: {
@@ -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
Binary file
@@ -1,3 +0,0 @@
1
- export * from './schemas.gen';
2
- export * from './services.gen';
3
- export * from './types.gen';
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);