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,036 lines (987 loc) 84.3 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 _DistrictList = _interopRequireDefault(require("../model/DistrictList")); var _DistrictRanking = _interopRequireDefault(require("../model/DistrictRanking")); var _Event = _interopRequireDefault(require("../model/Event")); var _EventSimple = _interopRequireDefault(require("../model/EventSimple")); var _Match = _interopRequireDefault(require("../model/Match")); var _MatchSimple = _interopRequireDefault(require("../model/MatchSimple")); var _Media = _interopRequireDefault(require("../model/Media")); var _Team = _interopRequireDefault(require("../model/Team")); var _TeamEventStatus = _interopRequireDefault(require("../model/TeamEventStatus")); var _TeamRobot = _interopRequireDefault(require("../model/TeamRobot")); 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); } /** * Team service. * @module api/TeamApi * @version 3.8.0 */ var TeamApi = /*#__PURE__*/function () { /** * Constructs a new TeamApi. * @alias module:api/TeamApi * @class * @param {module:ApiClient} [apiClient] Optional API client implementation to use, * default to {@link module:ApiClient#instance} if unspecified. */ function TeamApi(apiClient) { _classCallCheck(this, TeamApi); this.apiClient = apiClient || _ApiClient["default"].instance; } /** * Callback function to receive the result of the getDistrictRankings operation. * @callback module:api/TeamApi~getDistrictRankingsCallback * @param {String} error Error message, if any. * @param {Array.<module:model/DistrictRanking>} data The data returned by the service call. * @param {String} response The complete HTTP response. */ /** * Gets a list of team district rankings for 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/TeamApi~getDistrictRankingsCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link Array.<module:model/DistrictRanking>} */ _createClass(TeamApi, [{ key: "getDistrictRankings", value: function getDistrictRankings(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 getDistrictRankings"); } 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 = [_DistrictRanking["default"]]; return this.apiClient.callApi('/district/{district_key}/rankings', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback); } /** * Callback function to receive the result of the getDistrictTeams operation. * @callback module:api/TeamApi~getDistrictTeamsCallback * @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 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/TeamApi~getDistrictTeamsCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link Array.<module:model/Team>} */ }, { key: "getDistrictTeams", value: function getDistrictTeams(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 getDistrictTeams"); } 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 = [_Team["default"]]; return this.apiClient.callApi('/district/{district_key}/teams', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback); } /** * Callback function to receive the result of the getDistrictTeamsKeys operation. * @callback module:api/TeamApi~getDistrictTeamsKeysCallback * @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` objects that competed in 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/TeamApi~getDistrictTeamsKeysCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link Array.<String>} */ }, { key: "getDistrictTeamsKeys", value: function getDistrictTeamsKeys(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 getDistrictTeamsKeys"); } 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}/teams/keys', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback); } /** * Callback function to receive the result of the getDistrictTeamsSimple operation. * @callback module:api/TeamApi~getDistrictTeamsSimpleCallback * @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 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/TeamApi~getDistrictTeamsSimpleCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link Array.<module:model/TeamSimple>} */ }, { key: "getDistrictTeamsSimple", value: function getDistrictTeamsSimple(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 getDistrictTeamsSimple"); } 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 = [_TeamSimple["default"]]; return this.apiClient.callApi('/district/{district_key}/teams/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/TeamApi~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/TeamApi~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/TeamApi~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/TeamApi~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/TeamApi~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/TeamApi~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/TeamApi~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/TeamApi~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 getTeam operation. * @callback module:api/TeamApi~getTeamCallback * @param {String} error Error message, if any. * @param {module:model/Team} data The data returned by the service call. * @param {String} response The complete HTTP response. */ /** * Gets a `Team` object for the team referenced by the given key. * @param {String} teamKey TBA Team Key, eg `frc254` * @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/TeamApi~getTeamCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link module:model/Team} */ }, { key: "getTeam", value: function getTeam(teamKey, 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 getTeam"); } var pathParams = { 'team_key': teamKey }; 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('/team/{team_key}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback); } /** * Callback function to receive the result of the getTeamAwards operation. * @callback module:api/TeamApi~getTeamAwardsCallback * @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 has won. * @param {String} teamKey TBA Team Key, eg `frc254` * @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/TeamApi~getTeamAwardsCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link Array.<module:model/Award>} */ }, { key: "getTeamAwards", value: function getTeamAwards(teamKey, 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 getTeamAwards"); } var pathParams = { 'team_key': teamKey }; 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}/awards', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback); } /** * Callback function to receive the result of the getTeamAwardsByYear operation. * @callback module:api/TeamApi~getTeamAwardsByYearCallback * @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 has won in a given year. * @param {String} teamKey TBA Team Key, eg `frc254` * @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/TeamApi~getTeamAwardsByYearCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link Array.<module:model/Award>} */ }, { key: "getTeamAwardsByYear", value: function getTeamAwardsByYear(teamKey, year, 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 getTeamAwardsByYear"); } // verify the required parameter 'year' is set if (year === undefined || year === null) { throw new Error("Missing the required parameter 'year' when calling getTeamAwardsByYear"); } var pathParams = { 'team_key': teamKey, 'year': year }; 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}/awards/{year}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback); } /** * Callback function to receive the result of the getTeamDistricts operation. * @callback module:api/TeamApi~getTeamDistrictsCallback * @param {String} error Error message, if any. * @param {Array.<module:model/DistrictList>} data The data returned by the service call. * @param {String} response The complete HTTP response. */ /** * Gets an array of districts representing each year the team was in a district. Will return an empty array if the team was never in a district. * @param {String} teamKey TBA Team Key, eg `frc254` * @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/TeamApi~getTeamDistrictsCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link Array.<module:model/DistrictList>} */ }, { key: "getTeamDistricts", value: function getTeamDistricts(teamKey, 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 getTeamDistricts"); } var pathParams = { 'team_key': teamKey }; var queryParams = {}; var headerParams = { 'If-Modified-Since': opts['ifModifiedSince'] }; var formParams = {}; var authNames = ['apiKey']; var contentTypes = []; var accepts = ['application/json']; var returnType = [_DistrictList["default"]]; return this.apiClient.callApi('/team/{team_key}/districts', '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/TeamApi~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/TeamApi~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/TeamApi~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/TeamApi~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': 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('/team/{team_key}/event/{event_key}/matches', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback); } /** * Callback function to receive the result of the getTeamEventMatchesKeys operation. * @callback module:api/TeamApi~getTeamEventMatchesKeysCallback * @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 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/TeamApi~getTeamEventMatchesKeysCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link Array.<String>} */ }, { key: "getTeamEventMatchesKeys", value: function getTeamEventMatchesKeys(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 getTeamEventMatchesKeys"); } // verify the required parameter 'eventKey' is set if (eventKey === undefined || eventKey === null) { throw new Error("Missing the required parameter 'eventKey' when calling getTeamEventMatchesKeys"); } 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 = ['String']; return this.apiClient.callApi('/team/{team_key}/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 getTeamEventMatchesSimple operation. * @callback module:api/TeamApi~getTeamEventMatchesSimpleCallback * @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 short-form 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/TeamApi~getTeamEventMatchesSimpleCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link Array.<module:model/Match>} */ }, { key: "getTeamEventMatchesSimple", value: function getTeamEventMatchesSimple(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 getTeamEventMatchesSimple"); } // verify the required parameter 'eventKey' is set if (eventKey === undefined || eventKey === null) { throw new Error("Missing the required parameter 'eventKey' when calling getTeamEventMatchesSimple"); } 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 = [_Match["default"]]; return this.apiClient.callApi('/team/{team_key}/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 getTeamEventStatus operation. * @callback module:api/TeamApi~getTeamEventStatusCallback * @param {String} error Error message, if any. * @param {module:model/TeamEventStatus} data The data returned by the service call. * @param {String} response The complete HTTP response. */ /** * Gets the competition rank and status of the team 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/TeamApi~getTeamEventStatusCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link module:model/TeamEventStatus} */ }, { key: "getTeamEventStatus", value: function getTeamEventStatus(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 getTeamEventStatus"); } // verify the required parameter 'eventKey' is set if (eventKey === undefined || eventKey === null) { throw new Error("Missing the required parameter 'eventKey' when calling getTeamEventStatus"); } 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 = _TeamEventStatus["default"]; return this.apiClient.callApi('/team/{team_key}/event/{event_key}/status', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback); } /** * Callback function to receive the result of the getTeamEvents operation. * @callback module:api/TeamApi~getTeamEventsCallback * @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 all events this team has competed at. * @param {String} teamKey TBA Team Key, eg `frc254` * @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/TeamApi~getTeamEventsCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link Array.<module:model/Event>} */ }, { key: "getTeamEvents", value: function getTeamEvents(teamKey, 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 getTeamEvents"); } var pathParams = { 'team_key': teamKey }; 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('/team/{team_key}/events', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback); } /** * Callback function to receive the result of the getTeamEventsByYear operation. * @callback module:api/TeamApi~getTeamEventsByYearCallback * @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 this team has competed at in the given year. * @param {String} teamKey TBA Team Key, eg `frc254` * @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/TeamApi~getTeamEventsByYearCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link Array.<module:model/Event>} */ }, { key: "getTeamEventsByYear", value: function getTeamEventsByYear(teamKey, year, 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 getTeamEventsByYear"); } // verify the required parameter 'year' is set if (year === undefined || year === null) { throw new Error("Missing the required parameter 'year' when calling getTeamEventsByYear"); } var pathParams = { 'team_key': teamKey, '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('/team/{team_key}/events/{year}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback); } /** * Callback function to receive the result of the getTeamEventsByYearKeys operation. * @callback module:api/TeamApi~getTeamEventsByYearKeysCallback * @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 the event keys for events this team has competed at in the given year. * @param {String} teamKey TBA Team Key, eg `frc254` * @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/TeamApi~getTeamEventsByYearKeysCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link Array.<String>} */ }, { key: "getTeamEventsByYearKeys", value: function getTeamEventsByYearKeys(teamKey, year, 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 getTeamEventsByYearKeys"); } // verify the required parameter 'year' is set if (year === undefined || year === null) { throw new Error("Missing the required parameter 'year' when calling getTeamEventsByYearKeys"); } var pathParams = { 'team_key': teamKey, '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('/team/{team_key}/events/{year}/keys', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback); } /** * Callback function to receive the result of the getTeamEventsByYearSimple operation. * @callback module:api/TeamApi~getTeamEventsByYearSimpleCallback * @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 this team has competed at in the given year. * @param {String} teamKey TBA Team Key, eg `frc254` * @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/TeamApi~getTeamEventsByYearSimpleCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link Array.<module:model/EventSimple>} */ }, { key: "getTeamEventsByYearSimple", value: function getTeamEventsByYearSimple(teamKey, year, 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 getTeamEventsByYearSimple"); } // verify the required parameter 'year' is set if (year === undefined || year === null) { throw new Error("Missing the required parameter 'year' when calling getTeamEventsByYearSimple"); } var pathParams = { 'team_key': teamKey, '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('/team/{team_key}/events/{year}/simple', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback); } /** * Callback function to receive the result of the getTeamEventsKeys operation. * @callback module:api/TeamApi~getTeamEventsKeysCallback * @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 the event keys for all events this team has competed at. * @param {String} teamKey TBA Team Key, eg `frc254` * @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/TeamApi~getTeamEventsKeysCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link Array.<String>} */ }, { key: "getTeamEventsKeys", value: function getTeamEventsKeys(teamKey, 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 getTeamEventsKeys"); } var pathParams = { 'team_key': teamKey }; 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('/team/{team_key}/events/keys', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback); } /** * Callback function to receive the result of the getTeamEventsSimple operation. * @callback module:api/TeamApi~getTeamEventsSimpleCallback * @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 all events this team has competed at. * @param {String} teamKey TBA Team Key, eg `frc254` * @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/TeamApi~getTeamEventsSimpleCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link Array.<module:model/EventSimple>} */ }, { key: "getTeamEventsSimple", value: function getTeamEventsSimple(teamKey, 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 getTeamEventsSimple"); } var pathParams = { 'team_key': teamKey }; 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('/team/{team_key}/events/simple', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback); } /** * Callback function to receive the result of the getTeamEventsStatusesByYear operation. * @callback module:api/TeamApi~getTeamEventsStatusesByYearCallback * @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 events this team has competed at in the given year. * @param {String} teamKey TBA Team Key, eg `frc254` * @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/TeamApi~getTeamEventsStatusesByYearCallback} callback The callback function, accepting three arguments: error, data, response * data is of type