UNPKG

@brayjamin/tba-api-v3client

Version:

_Overview__Information_and_statistics_about_FIRST_Robotics_Competition_teams_and_events___Authentication_All_endpoints_require_an_Auth_Key_to_be_passed_in_the_header_X_TBA_Auth_Key__If_you_do_not_have_an_auth_key_yet_you_can_obtain_one_from_your__Account_

1,046 lines (995 loc) 71.6 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _ApiClient = _interopRequireDefault(require("../ApiClient")); var _Award = _interopRequireDefault(require("../model/Award")); var _EliminationAlliance = _interopRequireDefault(require("../model/EliminationAlliance")); var _Event = _interopRequireDefault(require("../model/Event")); var _EventDistrictPoints = _interopRequireDefault(require("../model/EventDistrictPoints")); var _EventInsights = _interopRequireDefault(require("../model/EventInsights")); var _EventOPRs = _interopRequireDefault(require("../model/EventOPRs")); var _EventRanking = _interopRequireDefault(require("../model/EventRanking")); var _EventSimple = _interopRequireDefault(require("../model/EventSimple")); var _Match = _interopRequireDefault(require("../model/Match")); var _MatchSimple = _interopRequireDefault(require("../model/MatchSimple")); var _Team = _interopRequireDefault(require("../model/Team")); var _TeamEventStatus = _interopRequireDefault(require("../model/TeamEventStatus")); var _TeamSimple = _interopRequireDefault(require("../model/TeamSimple")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); } function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } /** * Event service. * @module api/EventApi * @version 3.8.0 */ var EventApi = /*#__PURE__*/function () { /** * Constructs a new EventApi. * @alias module:api/EventApi * @class * @param {module:ApiClient} [apiClient] Optional API client implementation to use, * default to {@link module:ApiClient#instance} if unspecified. */ function EventApi(apiClient) { _classCallCheck(this, EventApi); this.apiClient = apiClient || _ApiClient["default"].instance; } /** * Callback function to receive the result of the getDistrictEvents operation. * @callback module:api/EventApi~getDistrictEventsCallback * @param {String} error Error message, if any. * @param {Array.<module:model/Event>} data The data returned by the service call. * @param {String} response The complete HTTP response. */ /** * Gets a list of events in the given district. * @param {String} districtKey TBA District Key, eg `2016fim` * @param {Object} opts Optional parameters * @param {String} opts.ifModifiedSince Value of the `Last-Modified` header in the most recently cached response by the client. * @param {module:api/EventApi~getDistrictEventsCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link Array.<module:model/Event>} */ _createClass(EventApi, [{ key: "getDistrictEvents", value: function getDistrictEvents(districtKey, opts, callback) { opts = opts || {}; var postBody = null; // verify the required parameter 'districtKey' is set if (districtKey === undefined || districtKey === null) { throw new Error("Missing the required parameter 'districtKey' when calling getDistrictEvents"); } var pathParams = { 'district_key': districtKey }; var queryParams = {}; var headerParams = { 'If-Modified-Since': opts['ifModifiedSince'] }; var formParams = {}; var authNames = ['apiKey']; var contentTypes = []; var accepts = ['application/json']; var returnType = [_Event["default"]]; return this.apiClient.callApi('/district/{district_key}/events', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback); } /** * Callback function to receive the result of the getDistrictEventsKeys operation. * @callback module:api/EventApi~getDistrictEventsKeysCallback * @param {String} error Error message, if any. * @param {Array.<String>} data The data returned by the service call. * @param {String} response The complete HTTP response. */ /** * Gets a list of event keys for events in the given district. * @param {String} districtKey TBA District Key, eg `2016fim` * @param {Object} opts Optional parameters * @param {String} opts.ifModifiedSince Value of the `Last-Modified` header in the most recently cached response by the client. * @param {module:api/EventApi~getDistrictEventsKeysCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link Array.<String>} */ }, { key: "getDistrictEventsKeys", value: function getDistrictEventsKeys(districtKey, opts, callback) { opts = opts || {}; var postBody = null; // verify the required parameter 'districtKey' is set if (districtKey === undefined || districtKey === null) { throw new Error("Missing the required parameter 'districtKey' when calling getDistrictEventsKeys"); } var pathParams = { 'district_key': districtKey }; var queryParams = {}; var headerParams = { 'If-Modified-Since': opts['ifModifiedSince'] }; var formParams = {}; var authNames = ['apiKey']; var contentTypes = []; var accepts = ['application/json']; var returnType = ['String']; return this.apiClient.callApi('/district/{district_key}/events/keys', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback); } /** * Callback function to receive the result of the getDistrictEventsSimple operation. * @callback module:api/EventApi~getDistrictEventsSimpleCallback * @param {String} error Error message, if any. * @param {Array.<module:model/EventSimple>} data The data returned by the service call. * @param {String} response The complete HTTP response. */ /** * Gets a short-form list of events in the given district. * @param {String} districtKey TBA District Key, eg `2016fim` * @param {Object} opts Optional parameters * @param {String} opts.ifModifiedSince Value of the `Last-Modified` header in the most recently cached response by the client. * @param {module:api/EventApi~getDistrictEventsSimpleCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link Array.<module:model/EventSimple>} */ }, { key: "getDistrictEventsSimple", value: function getDistrictEventsSimple(districtKey, opts, callback) { opts = opts || {}; var postBody = null; // verify the required parameter 'districtKey' is set if (districtKey === undefined || districtKey === null) { throw new Error("Missing the required parameter 'districtKey' when calling getDistrictEventsSimple"); } var pathParams = { 'district_key': districtKey }; var queryParams = {}; var headerParams = { 'If-Modified-Since': opts['ifModifiedSince'] }; var formParams = {}; var authNames = ['apiKey']; var contentTypes = []; var accepts = ['application/json']; var returnType = [_EventSimple["default"]]; return this.apiClient.callApi('/district/{district_key}/events/simple', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback); } /** * Callback function to receive the result of the getEvent operation. * @callback module:api/EventApi~getEventCallback * @param {String} error Error message, if any. * @param {module:model/Event} data The data returned by the service call. * @param {String} response The complete HTTP response. */ /** * Gets an Event. * @param {String} eventKey TBA Event Key, eg `2016nytr` * @param {Object} opts Optional parameters * @param {String} opts.ifModifiedSince Value of the `Last-Modified` header in the most recently cached response by the client. * @param {module:api/EventApi~getEventCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link module:model/Event} */ }, { key: "getEvent", value: function getEvent(eventKey, opts, callback) { opts = opts || {}; var postBody = null; // verify the required parameter 'eventKey' is set if (eventKey === undefined || eventKey === null) { throw new Error("Missing the required parameter 'eventKey' when calling getEvent"); } var pathParams = { 'event_key': eventKey }; var queryParams = {}; var headerParams = { 'If-Modified-Since': opts['ifModifiedSince'] }; var formParams = {}; var authNames = ['apiKey']; var contentTypes = []; var accepts = ['application/json']; var returnType = _Event["default"]; return this.apiClient.callApi('/event/{event_key}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback); } /** * Callback function to receive the result of the getEventAlliances operation. * @callback module:api/EventApi~getEventAlliancesCallback * @param {String} error Error message, if any. * @param {Array.<module:model/EliminationAlliance>} data The data returned by the service call. * @param {String} response The complete HTTP response. */ /** * Gets a list of Elimination Alliances for the given Event. * @param {String} eventKey TBA Event Key, eg `2016nytr` * @param {Object} opts Optional parameters * @param {String} opts.ifModifiedSince Value of the `Last-Modified` header in the most recently cached response by the client. * @param {module:api/EventApi~getEventAlliancesCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link Array.<module:model/EliminationAlliance>} */ }, { key: "getEventAlliances", value: function getEventAlliances(eventKey, opts, callback) { opts = opts || {}; var postBody = null; // verify the required parameter 'eventKey' is set if (eventKey === undefined || eventKey === null) { throw new Error("Missing the required parameter 'eventKey' when calling getEventAlliances"); } var pathParams = { 'event_key': eventKey }; var queryParams = {}; var headerParams = { 'If-Modified-Since': opts['ifModifiedSince'] }; var formParams = {}; var authNames = ['apiKey']; var contentTypes = []; var accepts = ['application/json']; var returnType = [_EliminationAlliance["default"]]; return this.apiClient.callApi('/event/{event_key}/alliances', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback); } /** * Callback function to receive the result of the getEventAwards operation. * @callback module:api/EventApi~getEventAwardsCallback * @param {String} error Error message, if any. * @param {Array.<module:model/Award>} data The data returned by the service call. * @param {String} response The complete HTTP response. */ /** * Gets a list of awards from the given event. * @param {String} eventKey TBA Event Key, eg `2016nytr` * @param {Object} opts Optional parameters * @param {String} opts.ifModifiedSince Value of the `Last-Modified` header in the most recently cached response by the client. * @param {module:api/EventApi~getEventAwardsCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link Array.<module:model/Award>} */ }, { key: "getEventAwards", value: function getEventAwards(eventKey, opts, callback) { opts = opts || {}; var postBody = null; // verify the required parameter 'eventKey' is set if (eventKey === undefined || eventKey === null) { throw new Error("Missing the required parameter 'eventKey' when calling getEventAwards"); } var pathParams = { 'event_key': eventKey }; var queryParams = {}; var headerParams = { 'If-Modified-Since': opts['ifModifiedSince'] }; var formParams = {}; var authNames = ['apiKey']; var contentTypes = []; var accepts = ['application/json']; var returnType = [_Award["default"]]; return this.apiClient.callApi('/event/{event_key}/awards', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback); } /** * Callback function to receive the result of the getEventDistrictPoints operation. * @callback module:api/EventApi~getEventDistrictPointsCallback * @param {String} error Error message, if any. * @param {module:model/EventDistrictPoints} data The data returned by the service call. * @param {String} response The complete HTTP response. */ /** * Gets a list of team rankings for the Event. * @param {String} eventKey TBA Event Key, eg `2016nytr` * @param {Object} opts Optional parameters * @param {String} opts.ifModifiedSince Value of the `Last-Modified` header in the most recently cached response by the client. * @param {module:api/EventApi~getEventDistrictPointsCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link module:model/EventDistrictPoints} */ }, { key: "getEventDistrictPoints", value: function getEventDistrictPoints(eventKey, opts, callback) { opts = opts || {}; var postBody = null; // verify the required parameter 'eventKey' is set if (eventKey === undefined || eventKey === null) { throw new Error("Missing the required parameter 'eventKey' when calling getEventDistrictPoints"); } var pathParams = { 'event_key': eventKey }; var queryParams = {}; var headerParams = { 'If-Modified-Since': opts['ifModifiedSince'] }; var formParams = {}; var authNames = ['apiKey']; var contentTypes = []; var accepts = ['application/json']; var returnType = _EventDistrictPoints["default"]; return this.apiClient.callApi('/event/{event_key}/district_points', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback); } /** * Callback function to receive the result of the getEventInsights operation. * @callback module:api/EventApi~getEventInsightsCallback * @param {String} error Error message, if any. * @param {module:model/EventInsights} data The data returned by the service call. * @param {String} response The complete HTTP response. */ /** * Gets a set of Event-specific insights for the given Event. * @param {String} eventKey TBA Event Key, eg `2016nytr` * @param {Object} opts Optional parameters * @param {String} opts.ifModifiedSince Value of the `Last-Modified` header in the most recently cached response by the client. * @param {module:api/EventApi~getEventInsightsCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link module:model/EventInsights} */ }, { key: "getEventInsights", value: function getEventInsights(eventKey, opts, callback) { opts = opts || {}; var postBody = null; // verify the required parameter 'eventKey' is set if (eventKey === undefined || eventKey === null) { throw new Error("Missing the required parameter 'eventKey' when calling getEventInsights"); } var pathParams = { 'event_key': eventKey }; var queryParams = {}; var headerParams = { 'If-Modified-Since': opts['ifModifiedSince'] }; var formParams = {}; var authNames = ['apiKey']; var contentTypes = []; var accepts = ['application/json']; var returnType = _EventInsights["default"]; return this.apiClient.callApi('/event/{event_key}/insights', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback); } /** * Callback function to receive the result of the getEventMatchTimeseries operation. * @callback module:api/EventApi~getEventMatchTimeseriesCallback * @param {String} error Error message, if any. * @param {Array.<String>} data The data returned by the service call. * @param {String} response The complete HTTP response. */ /** * Gets an array of Match Keys for the given event key that have timeseries data. Returns an empty array if no matches have timeseries data. *WARNING:* This is *not* official data, and is subject to a significant possibility of error, or missing data. Do not rely on this data for any purpose. In fact, pretend we made it up. *WARNING:* This endpoint and corresponding data models are under *active development* and may change at any time, including in breaking ways. * @param {String} eventKey TBA Event Key, eg `2016nytr` * @param {Object} opts Optional parameters * @param {String} opts.ifModifiedSince Value of the `Last-Modified` header in the most recently cached response by the client. * @param {module:api/EventApi~getEventMatchTimeseriesCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link Array.<String>} */ }, { key: "getEventMatchTimeseries", value: function getEventMatchTimeseries(eventKey, opts, callback) { opts = opts || {}; var postBody = null; // verify the required parameter 'eventKey' is set if (eventKey === undefined || eventKey === null) { throw new Error("Missing the required parameter 'eventKey' when calling getEventMatchTimeseries"); } var pathParams = { 'event_key': eventKey }; var queryParams = {}; var headerParams = { 'If-Modified-Since': opts['ifModifiedSince'] }; var formParams = {}; var authNames = ['apiKey']; var contentTypes = []; var accepts = ['application/json']; var returnType = ['String']; return this.apiClient.callApi('/event/{event_key}/matches/timeseries', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback); } /** * Callback function to receive the result of the getEventMatches operation. * @callback module:api/EventApi~getEventMatchesCallback * @param {String} error Error message, if any. * @param {Array.<module:model/Match>} data The data returned by the service call. * @param {String} response The complete HTTP response. */ /** * Gets a list of matches for the given event. * @param {String} eventKey TBA Event Key, eg `2016nytr` * @param {Object} opts Optional parameters * @param {String} opts.ifModifiedSince Value of the `Last-Modified` header in the most recently cached response by the client. * @param {module:api/EventApi~getEventMatchesCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link Array.<module:model/Match>} */ }, { key: "getEventMatches", value: function getEventMatches(eventKey, opts, callback) { opts = opts || {}; var postBody = null; // verify the required parameter 'eventKey' is set if (eventKey === undefined || eventKey === null) { throw new Error("Missing the required parameter 'eventKey' when calling getEventMatches"); } var pathParams = { 'event_key': eventKey }; var queryParams = {}; var headerParams = { 'If-Modified-Since': opts['ifModifiedSince'] }; var formParams = {}; var authNames = ['apiKey']; var contentTypes = []; var accepts = ['application/json']; var returnType = [_Match["default"]]; return this.apiClient.callApi('/event/{event_key}/matches', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback); } /** * Callback function to receive the result of the getEventMatchesKeys operation. * @callback module:api/EventApi~getEventMatchesKeysCallback * @param {String} error Error message, if any. * @param {Array.<String>} data The data returned by the service call. * @param {String} response The complete HTTP response. */ /** * Gets a list of match keys for the given event. * @param {String} eventKey TBA Event Key, eg `2016nytr` * @param {Object} opts Optional parameters * @param {String} opts.ifModifiedSince Value of the `Last-Modified` header in the most recently cached response by the client. * @param {module:api/EventApi~getEventMatchesKeysCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link Array.<String>} */ }, { key: "getEventMatchesKeys", value: function getEventMatchesKeys(eventKey, opts, callback) { opts = opts || {}; var postBody = null; // verify the required parameter 'eventKey' is set if (eventKey === undefined || eventKey === null) { throw new Error("Missing the required parameter 'eventKey' when calling getEventMatchesKeys"); } var pathParams = { 'event_key': eventKey }; var queryParams = {}; var headerParams = { 'If-Modified-Since': opts['ifModifiedSince'] }; var formParams = {}; var authNames = ['apiKey']; var contentTypes = []; var accepts = ['application/json']; var returnType = ['String']; return this.apiClient.callApi('/event/{event_key}/matches/keys', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback); } /** * Callback function to receive the result of the getEventMatchesSimple operation. * @callback module:api/EventApi~getEventMatchesSimpleCallback * @param {String} error Error message, if any. * @param {Array.<module:model/MatchSimple>} data The data returned by the service call. * @param {String} response The complete HTTP response. */ /** * Gets a short-form list of matches for the given event. * @param {String} eventKey TBA Event Key, eg `2016nytr` * @param {Object} opts Optional parameters * @param {String} opts.ifModifiedSince Value of the `Last-Modified` header in the most recently cached response by the client. * @param {module:api/EventApi~getEventMatchesSimpleCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link Array.<module:model/MatchSimple>} */ }, { key: "getEventMatchesSimple", value: function getEventMatchesSimple(eventKey, opts, callback) { opts = opts || {}; var postBody = null; // verify the required parameter 'eventKey' is set if (eventKey === undefined || eventKey === null) { throw new Error("Missing the required parameter 'eventKey' when calling getEventMatchesSimple"); } var pathParams = { 'event_key': eventKey }; var queryParams = {}; var headerParams = { 'If-Modified-Since': opts['ifModifiedSince'] }; var formParams = {}; var authNames = ['apiKey']; var contentTypes = []; var accepts = ['application/json']; var returnType = [_MatchSimple["default"]]; return this.apiClient.callApi('/event/{event_key}/matches/simple', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback); } /** * Callback function to receive the result of the getEventOPRs operation. * @callback module:api/EventApi~getEventOPRsCallback * @param {String} error Error message, if any. * @param {module:model/EventOPRs} data The data returned by the service call. * @param {String} response The complete HTTP response. */ /** * Gets a set of Event OPRs (including OPR, DPR, and CCWM) for the given Event. * @param {String} eventKey TBA Event Key, eg `2016nytr` * @param {Object} opts Optional parameters * @param {String} opts.ifModifiedSince Value of the `Last-Modified` header in the most recently cached response by the client. * @param {module:api/EventApi~getEventOPRsCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link module:model/EventOPRs} */ }, { key: "getEventOPRs", value: function getEventOPRs(eventKey, opts, callback) { opts = opts || {}; var postBody = null; // verify the required parameter 'eventKey' is set if (eventKey === undefined || eventKey === null) { throw new Error("Missing the required parameter 'eventKey' when calling getEventOPRs"); } var pathParams = { 'event_key': eventKey }; var queryParams = {}; var headerParams = { 'If-Modified-Since': opts['ifModifiedSince'] }; var formParams = {}; var authNames = ['apiKey']; var contentTypes = []; var accepts = ['application/json']; var returnType = _EventOPRs["default"]; return this.apiClient.callApi('/event/{event_key}/oprs', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback); } /** * Callback function to receive the result of the getEventPredictions operation. * @callback module:api/EventApi~getEventPredictionsCallback * @param {String} error Error message, if any. * @param {Object} data The data returned by the service call. * @param {String} response The complete HTTP response. */ /** * Gets information on TBA-generated predictions for the given Event. Contains year-specific information. *WARNING* This endpoint is currently under development and may change at any time. * @param {String} eventKey TBA Event Key, eg `2016nytr` * @param {Object} opts Optional parameters * @param {String} opts.ifModifiedSince Value of the `Last-Modified` header in the most recently cached response by the client. * @param {module:api/EventApi~getEventPredictionsCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link Object} */ }, { key: "getEventPredictions", value: function getEventPredictions(eventKey, opts, callback) { opts = opts || {}; var postBody = null; // verify the required parameter 'eventKey' is set if (eventKey === undefined || eventKey === null) { throw new Error("Missing the required parameter 'eventKey' when calling getEventPredictions"); } var pathParams = { 'event_key': eventKey }; var queryParams = {}; var headerParams = { 'If-Modified-Since': opts['ifModifiedSince'] }; var formParams = {}; var authNames = ['apiKey']; var contentTypes = []; var accepts = ['application/json']; var returnType = Object; return this.apiClient.callApi('/event/{event_key}/predictions', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback); } /** * Callback function to receive the result of the getEventRankings operation. * @callback module:api/EventApi~getEventRankingsCallback * @param {String} error Error message, if any. * @param {module:model/EventRanking} data The data returned by the service call. * @param {String} response The complete HTTP response. */ /** * Gets a list of team rankings for the Event. * @param {String} eventKey TBA Event Key, eg `2016nytr` * @param {Object} opts Optional parameters * @param {String} opts.ifModifiedSince Value of the `Last-Modified` header in the most recently cached response by the client. * @param {module:api/EventApi~getEventRankingsCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link module:model/EventRanking} */ }, { key: "getEventRankings", value: function getEventRankings(eventKey, opts, callback) { opts = opts || {}; var postBody = null; // verify the required parameter 'eventKey' is set if (eventKey === undefined || eventKey === null) { throw new Error("Missing the required parameter 'eventKey' when calling getEventRankings"); } var pathParams = { 'event_key': eventKey }; var queryParams = {}; var headerParams = { 'If-Modified-Since': opts['ifModifiedSince'] }; var formParams = {}; var authNames = ['apiKey']; var contentTypes = []; var accepts = ['application/json']; var returnType = _EventRanking["default"]; return this.apiClient.callApi('/event/{event_key}/rankings', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback); } /** * Callback function to receive the result of the getEventSimple operation. * @callback module:api/EventApi~getEventSimpleCallback * @param {String} error Error message, if any. * @param {module:model/EventSimple} data The data returned by the service call. * @param {String} response The complete HTTP response. */ /** * Gets a short-form Event. * @param {String} eventKey TBA Event Key, eg `2016nytr` * @param {Object} opts Optional parameters * @param {String} opts.ifModifiedSince Value of the `Last-Modified` header in the most recently cached response by the client. * @param {module:api/EventApi~getEventSimpleCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link module:model/EventSimple} */ }, { key: "getEventSimple", value: function getEventSimple(eventKey, opts, callback) { opts = opts || {}; var postBody = null; // verify the required parameter 'eventKey' is set if (eventKey === undefined || eventKey === null) { throw new Error("Missing the required parameter 'eventKey' when calling getEventSimple"); } var pathParams = { 'event_key': eventKey }; var queryParams = {}; var headerParams = { 'If-Modified-Since': opts['ifModifiedSince'] }; var formParams = {}; var authNames = ['apiKey']; var contentTypes = []; var accepts = ['application/json']; var returnType = _EventSimple["default"]; return this.apiClient.callApi('/event/{event_key}/simple', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback); } /** * Callback function to receive the result of the getEventTeams operation. * @callback module:api/EventApi~getEventTeamsCallback * @param {String} error Error message, if any. * @param {Array.<module:model/Team>} data The data returned by the service call. * @param {String} response The complete HTTP response. */ /** * Gets a list of `Team` objects that competed in the given event. * @param {String} eventKey TBA Event Key, eg `2016nytr` * @param {Object} opts Optional parameters * @param {String} opts.ifModifiedSince Value of the `Last-Modified` header in the most recently cached response by the client. * @param {module:api/EventApi~getEventTeamsCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link Array.<module:model/Team>} */ }, { key: "getEventTeams", value: function getEventTeams(eventKey, opts, callback) { opts = opts || {}; var postBody = null; // verify the required parameter 'eventKey' is set if (eventKey === undefined || eventKey === null) { throw new Error("Missing the required parameter 'eventKey' when calling getEventTeams"); } var pathParams = { 'event_key': eventKey }; var queryParams = {}; var headerParams = { 'If-Modified-Since': opts['ifModifiedSince'] }; var formParams = {}; var authNames = ['apiKey']; var contentTypes = []; var accepts = ['application/json']; var returnType = [_Team["default"]]; return this.apiClient.callApi('/event/{event_key}/teams', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback); } /** * Callback function to receive the result of the getEventTeamsKeys operation. * @callback module:api/EventApi~getEventTeamsKeysCallback * @param {String} error Error message, if any. * @param {Array.<String>} data The data returned by the service call. * @param {String} response The complete HTTP response. */ /** * Gets a list of `Team` keys that competed in the given event. * @param {String} eventKey TBA Event Key, eg `2016nytr` * @param {Object} opts Optional parameters * @param {String} opts.ifModifiedSince Value of the `Last-Modified` header in the most recently cached response by the client. * @param {module:api/EventApi~getEventTeamsKeysCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link Array.<String>} */ }, { key: "getEventTeamsKeys", value: function getEventTeamsKeys(eventKey, opts, callback) { opts = opts || {}; var postBody = null; // verify the required parameter 'eventKey' is set if (eventKey === undefined || eventKey === null) { throw new Error("Missing the required parameter 'eventKey' when calling getEventTeamsKeys"); } var pathParams = { 'event_key': eventKey }; var queryParams = {}; var headerParams = { 'If-Modified-Since': opts['ifModifiedSince'] }; var formParams = {}; var authNames = ['apiKey']; var contentTypes = []; var accepts = ['application/json']; var returnType = ['String']; return this.apiClient.callApi('/event/{event_key}/teams/keys', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback); } /** * Callback function to receive the result of the getEventTeamsSimple operation. * @callback module:api/EventApi~getEventTeamsSimpleCallback * @param {String} error Error message, if any. * @param {Array.<module:model/TeamSimple>} data The data returned by the service call. * @param {String} response The complete HTTP response. */ /** * Gets a short-form list of `Team` objects that competed in the given event. * @param {String} eventKey TBA Event Key, eg `2016nytr` * @param {Object} opts Optional parameters * @param {String} opts.ifModifiedSince Value of the `Last-Modified` header in the most recently cached response by the client. * @param {module:api/EventApi~getEventTeamsSimpleCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link Array.<module:model/TeamSimple>} */ }, { key: "getEventTeamsSimple", value: function getEventTeamsSimple(eventKey, opts, callback) { opts = opts || {}; var postBody = null; // verify the required parameter 'eventKey' is set if (eventKey === undefined || eventKey === null) { throw new Error("Missing the required parameter 'eventKey' when calling getEventTeamsSimple"); } var pathParams = { 'event_key': eventKey }; var queryParams = {}; var headerParams = { 'If-Modified-Since': opts['ifModifiedSince'] }; var formParams = {}; var authNames = ['apiKey']; var contentTypes = []; var accepts = ['application/json']; var returnType = [_TeamSimple["default"]]; return this.apiClient.callApi('/event/{event_key}/teams/simple', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback); } /** * Callback function to receive the result of the getEventTeamsStatuses operation. * @callback module:api/EventApi~getEventTeamsStatusesCallback * @param {String} error Error message, if any. * @param {Object.<String, module:model/{String: TeamEventStatus}>} data The data returned by the service call. * @param {String} response The complete HTTP response. */ /** * Gets a key-value list of the event statuses for teams competing at the given event. * @param {String} eventKey TBA Event Key, eg `2016nytr` * @param {Object} opts Optional parameters * @param {String} opts.ifModifiedSince Value of the `Last-Modified` header in the most recently cached response by the client. * @param {module:api/EventApi~getEventTeamsStatusesCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link Object.<String, module:model/{String: TeamEventStatus}>} */ }, { key: "getEventTeamsStatuses", value: function getEventTeamsStatuses(eventKey, opts, callback) { opts = opts || {}; var postBody = null; // verify the required parameter 'eventKey' is set if (eventKey === undefined || eventKey === null) { throw new Error("Missing the required parameter 'eventKey' when calling getEventTeamsStatuses"); } var pathParams = { 'event_key': eventKey }; var queryParams = {}; var headerParams = { 'If-Modified-Since': opts['ifModifiedSince'] }; var formParams = {}; var authNames = ['apiKey']; var contentTypes = []; var accepts = ['application/json']; var returnType = { 'String': _TeamEventStatus["default"] }; return this.apiClient.callApi('/event/{event_key}/teams/statuses', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback); } /** * Callback function to receive the result of the getEventsByYear operation. * @callback module:api/EventApi~getEventsByYearCallback * @param {String} error Error message, if any. * @param {Array.<module:model/Event>} data The data returned by the service call. * @param {String} response The complete HTTP response. */ /** * Gets a list of events in the given year. * @param {Number} year Competition Year (or Season). Must be 4 digits. * @param {Object} opts Optional parameters * @param {String} opts.ifModifiedSince Value of the `Last-Modified` header in the most recently cached response by the client. * @param {module:api/EventApi~getEventsByYearCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link Array.<module:model/Event>} */ }, { key: "getEventsByYear", value: function getEventsByYear(year, opts, callback) { opts = opts || {}; var postBody = null; // verify the required parameter 'year' is set if (year === undefined || year === null) { throw new Error("Missing the required parameter 'year' when calling getEventsByYear"); } var pathParams = { 'year': year }; var queryParams = {}; var headerParams = { 'If-Modified-Since': opts['ifModifiedSince'] }; var formParams = {}; var authNames = ['apiKey']; var contentTypes = []; var accepts = ['application/json']; var returnType = [_Event["default"]]; return this.apiClient.callApi('/events/{year}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback); } /** * Callback function to receive the result of the getEventsByYearKeys operation. * @callback module:api/EventApi~getEventsByYearKeysCallback * @param {String} error Error message, if any. * @param {Array.<String>} data The data returned by the service call. * @param {String} response The complete HTTP response. */ /** * Gets a list of event keys in the given year. * @param {Number} year Competition Year (or Season). Must be 4 digits. * @param {Object} opts Optional parameters * @param {String} opts.ifModifiedSince Value of the `Last-Modified` header in the most recently cached response by the client. * @param {module:api/EventApi~getEventsByYearKeysCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link Array.<String>} */ }, { key: "getEventsByYearKeys", value: function getEventsByYearKeys(year, opts, callback) { opts = opts || {}; var postBody = null; // verify the required parameter 'year' is set if (year === undefined || year === null) { throw new Error("Missing the required parameter 'year' when calling getEventsByYearKeys"); } var pathParams = { 'year': year }; var queryParams = {}; var headerParams = { 'If-Modified-Since': opts['ifModifiedSince'] }; var formParams = {}; var authNames = ['apiKey']; var contentTypes = []; var accepts = ['application/json']; var returnType = ['String']; return this.apiClient.callApi('/events/{year}/keys', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback); } /** * Callback function to receive the result of the getEventsByYearSimple operation. * @callback module:api/EventApi~getEventsByYearSimpleCallback * @param {String} error Error message, if any. * @param {Array.<module:model/EventSimple>} data The data returned by the service call. * @param {String} response The complete HTTP response. */ /** * Gets a short-form list of events in the given year. * @param {Number} year Competition Year (or Season). Must be 4 digits. * @param {Object} opts Optional parameters * @param {String} opts.ifModifiedSince Value of the `Last-Modified` header in the most recently cached response by the client. * @param {module:api/EventApi~getEventsByYearSimpleCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link Array.<module:model/EventSimple>} */ }, { key: "getEventsByYearSimple", value: function getEventsByYearSimple(year, opts, callback) { opts = opts || {}; var postBody = null; // verify the required parameter 'year' is set if (year === undefined || year === null) { throw new Error("Missing the required parameter 'year' when calling getEventsByYearSimple"); } var pathParams = { 'year': year }; var queryParams = {}; var headerParams = { 'If-Modified-Since': opts['ifModifiedSince'] }; var formParams = {}; var authNames = ['apiKey']; var contentTypes = []; var accepts = ['application/json']; var returnType = [_EventSimple["default"]]; return this.apiClient.callApi('/events/{year}/simple', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback); } /** * Callback function to receive the result of the getTeamEventAwards operation. * @callback module:api/EventApi~getTeamEventAwardsCallback * @param {String} error Error message, if any. * @param {Array.<module:model/Award>} data The data returned by the service call. * @param {String} response The complete HTTP response. */ /** * Gets a list of awards the given team won at the given event. * @param {String} teamKey TBA Team Key, eg `frc254` * @param {String} eventKey TBA Event Key, eg `2016nytr` * @param {Object} opts Optional parameters * @param {String} opts.ifModifiedSince Value of the `Last-Modified` header in the most recently cached response by the client. * @param {module:api/EventApi~getTeamEventAwardsCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link Array.<module:model/Award>} */ }, { key: "getTeamEventAwards", value: function getTeamEventAwards(teamKey, eventKey, opts, callback) { opts = opts || {}; var postBody = null; // verify the required parameter 'teamKey' is set if (teamKey === undefined || teamKey === null) { throw new Error("Missing the required parameter 'teamKey' when calling getTeamEventAwards"); } // verify the required parameter 'eventKey' is set if (eventKey === undefined || eventKey === null) { throw new Error("Missing the required parameter 'eventKey' when calling getTeamEventAwards"); } var pathParams = { 'team_key': teamKey, 'event_key': eventKey }; var queryParams = {}; var headerParams = { 'If-Modified-Since': opts['ifModifiedSince'] }; var formParams = {}; var authNames = ['apiKey']; var contentTypes = []; var accepts = ['application/json']; var returnType = [_Award["default"]]; return this.apiClient.callApi('/team/{team_key}/event/{event_key}/awards', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback); } /** * Callback function to receive the result of the getTeamEventMatches operation. * @callback module:api/EventApi~getTeamEventMatchesCallback * @param {String} error Error message, if any. * @param {Array.<module:model/Match>} data The data returned by the service call. * @param {String} response The complete HTTP response. */ /** * Gets a list of matches for the given team and event. * @param {String} teamKey TBA Team Key, eg `frc254` * @param {String} eventKey TBA Event Key, eg `2016nytr` * @param {Object} opts Optional parameters * @param {String} opts.ifModifiedSince Value of the `Last-Modified` header in the most recently cached response by the client. * @param {module:api/EventApi~getTeamEventMatchesCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link Array.<module:model/Match>} */ }, { key: "getTeamEventMatches", value: function getTeamEventMatches(teamKey, eventKey, opts, callback) { opts = opts || {}; var postBody = null; // verify the required parameter 'teamKey' is set if (teamKey === undefined || teamKey === null) { throw new Error("Missing the required parameter 'teamKey' when calling getTeamEventMatches"); } // verify the required parameter 'eventKey' is set if (eventKey === undefined || eventKey === null) { throw new Error("Missing the required parameter 'eventKey' when calling getTeamEventMatches"); } var pathParams = { 'team_key': teamKey, 'event_key':