nascar-data-client
v1.0.8
Published
Object
Downloads
17
Readme
NASCAR.Data.Client - the JavaScript library for the NASCAR.Data.API
Table of Contents
Overview
- API version: 1.0
- Package version: 1.0
Installation
For Node.js
npm
To publish the library as a npm, please follow the procedure in "Publishing npm packages".
Then install it via:
npm install nascar-data-client --save
git
If the library is hosted at a git repository, e.g. https://github.com/GIT_USER_ID/GIT_REPO_ID then install it via:
npm install GIT_USER_ID/GIT_REPO_ID --save
For browser
The library also works in the browser environment via npm and browserify. After following
the above steps with Node.js and installing browserify with npm install -g browserify
,
perform the following (assuming main.js is your entry file):
browserify main.js > bundle.js
Then include bundle.js in the HTML pages.
Webpack Configuration
Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:
module: {
rules: [
{
parser: {
amd: false
}
}
]
}
Getting Started
Please follow the installation instruction and execute the following JS code:
var NascarDataClient = require('nascar-data-client');
var defaultClient = NascarDataClient.ApiClient.instance;
var api = new NascarDataClient.AccountApi()
var opts = {
'refreshToken': "refreshToken_example" // {String}
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.accountRefreshTokenGet(opts, callback);
Documentation for API Endpoints
All URIs are relative to /api
Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- NascarDataClient.AccountApi | accountRefreshTokenGet | GET /account/refresh-token | NascarDataClient.CompanyApi | companySearchGet | GET /company/search | NascarDataClient.DriverApi | driverGet | GET /driver | NascarDataClient.DriverApi | driverSeasonFinishesGet | GET /driver/season-finishes | NascarDataClient.DriverApi | driverSeasonGet | GET /driver/season | NascarDataClient.DriverSummaryApi | driverSummaryGet | GET /driver-summary | NascarDataClient.ERDPApi | erdpDatapointsGet | GET /erdp/datapoints | NascarDataClient.ERDPApi | erdpSourcesGet | GET /erdp/sources | NascarDataClient.FeedbackApi | feedbackDevNotesGet | GET /feedback/dev-notes | NascarDataClient.FeedbackApi | feedbackSubmitFeedbackPost | POST /feedback/submit-feedback | NascarDataClient.InspectionsApi | inspectionsOssGet | GET /inspections/oss | NascarDataClient.InspectionsApi | inspectionsVehicleWeightsGet | GET /inspections/vehicle-weights | NascarDataClient.OpticalTrackingApi | opticalTrackingUtmOffsetsGet | GET /optical-tracking/utm-offsets | NascarDataClient.PointsApi | pointsDriverPointsGet | GET /points/driver-points | NascarDataClient.PointsApi | pointsManufacturerPointsGet | GET /points/manufacturer-points | NascarDataClient.PointsApi | pointsOwnerPointsGet | GET /points/owner-points | NascarDataClient.RaceApi | raceCautionsGet | GET /race/cautions | NascarDataClient.RaceApi | raceDisciplineUpdatesGet | GET /race/discipline-updates | NascarDataClient.RaceApi | raceEntriesGet | GET /race/entries | NascarDataClient.RaceApi | raceGet | GET /race | NascarDataClient.RaceApi | raceInfractionsGet | GET /race/infractions | NascarDataClient.RaceApi | raceLapLeadersGet | GET /race/lap-leaders | NascarDataClient.RaceApi | raceLoopStatsGet | GET /race/loop-stats | NascarDataClient.RaceApi | racePitstopsGet | GET /race/pitstops | NascarDataClient.RaceApi | racePracticeResultsGet | GET /race/practice-results | NascarDataClient.RaceApi | raceQualifyingResultsGet | GET /race/qualifying-results | NascarDataClient.RaceApi | raceRaceResultsGet | GET /race/race-results | NascarDataClient.RaceApi | raceRostersGet | GET /race/rosters | NascarDataClient.RaceApi | raceSeasonGet | GET /race/season | NascarDataClient.RaceApi | raceStageResultsGet | GET /race/stage-results | NascarDataClient.RaceApi | raceViewmodelGet | GET /race/viewmodel | NascarDataClient.RaceApi | raceWeekendScheduleGet | GET /race/weekend-schedule | NascarDataClient.RaceWeekApi | raceWeekDetailsGet | GET /race-week/details | NascarDataClient.RaceWeekApi | raceWeekLiveGet | GET /race-week/live | NascarDataClient.RaceWeekApi | raceWeekSeasonGet | GET /race-week/season | NascarDataClient.SeriesApi | seriesGet | GET /series | NascarDataClient.VehicleApi | vehicleGet | GET /vehicle | NascarDataClient.VehicleApi | vehicleSeasonFinishesGet | GET /vehicle/season-finishes |
Documentation for Models
- NascarDataClient.Caution
- NascarDataClient.Company
- NascarDataClient.DevNote
- NascarDataClient.DisciplineUpdate
- NascarDataClient.Driver
- NascarDataClient.DriverPoint
- NascarDataClient.DriverSummary
- NascarDataClient.DriverSummaryByPrincipalRaceID
- NascarDataClient.DriverSummaryBySeason
- NascarDataClient.DriverSummaryByTrack
- NascarDataClient.DriverSummaryByTrackType
- NascarDataClient.Feedback
- NascarDataClient.Flag
- NascarDataClient.LapLeader
- NascarDataClient.LoopStat
- NascarDataClient.ManufacturerPoint
- NascarDataClient.NextGenDatapoint
- NascarDataClient.NextGenSource
- NascarDataClient.OSSScan
- NascarDataClient.OpticalTrackingUTMOffset
- NascarDataClient.OwnerPoint
- NascarDataClient.Pitstop
- NascarDataClient.PracticeRunResults
- NascarDataClient.ProcessingState
- NascarDataClient.PublishState
- NascarDataClient.QualifyingRunResults
- NascarDataClient.Race
- NascarDataClient.RaceDetails
- NascarDataClient.RaceInfraction
- NascarDataClient.RaceResult
- NascarDataClient.RaceResultSummary
- NascarDataClient.RaceRunResults
- NascarDataClient.RaceViewModel
- NascarDataClient.RaceWeek
- NascarDataClient.RaceWeekDetails
- NascarDataClient.RosterMember
- NascarDataClient.RunDetails
- NascarDataClient.RunEntry
- NascarDataClient.RunResult
- NascarDataClient.RunState
- NascarDataClient.RunType
- NascarDataClient.Series
- NascarDataClient.StageResult
- NascarDataClient.StageRunResults
- NascarDataClient.TeamRoster
- NascarDataClient.TokenResponse
- NascarDataClient.VehicleDetails
- NascarDataClient.VehicleWeight
- NascarDataClient.WeekendSchedule