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_

909 lines (866 loc) 43.5 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _ApiClient = _interopRequireDefault(require("../ApiClient")); var _DistrictRanking = _interopRequireDefault(require("../model/DistrictRanking")); var _Event = _interopRequireDefault(require("../model/Event")); var _EventSimple = _interopRequireDefault(require("../model/EventSimple")); 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); } /** * List service. * @module api/ListApi * @version 3.8.0 */ var ListApi = /*#__PURE__*/function () { /** * Constructs a new ListApi. * @alias module:api/ListApi * @class * @param {module:ApiClient} [apiClient] Optional API client implementation to use, * default to {@link module:ApiClient#instance} if unspecified. */ function ListApi(apiClient) { _classCallCheck(this, ListApi); this.apiClient = apiClient || _ApiClient["default"].instance; } /** * Callback function to receive the result of the getDistrictEvents operation. * @callback module:api/ListApi~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/ListApi~getDistrictEventsCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link Array.<module:model/Event>} */ _createClass(ListApi, [{ 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/ListApi~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/ListApi~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/ListApi~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/ListApi~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 getDistrictRankings operation. * @callback module:api/ListApi~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/ListApi~getDistrictRankingsCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link Array.<module:model/DistrictRanking>} */ }, { 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/ListApi~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/ListApi~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/ListApi~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/ListApi~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/ListApi~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/ListApi~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/ListApi~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/ListApi~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/ListApi~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/ListApi~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/ListApi~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/ListApi~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/ListApi~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/ListApi~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/ListApi~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/ListApi~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/ListApi~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/ListApi~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/ListApi~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/ListApi~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 getTeamEventsStatusesByYear operation. * @callback module:api/ListApi~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/ListApi~getTeamEventsStatusesByYearCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link Object.<String, module:model/{String: TeamEventStatus}>} */ }, { key: "getTeamEventsStatusesByYear", value: function getTeamEventsStatusesByYear(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 getTeamEventsStatusesByYear"); } // verify the required parameter 'year' is set if (year === undefined || year === null) { throw new Error("Missing the required parameter 'year' when calling getTeamEventsStatusesByYear"); } 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': _TeamEventStatus["default"] }; return this.apiClient.callApi('/team/{team_key}/events/{year}/statuses', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback); } /** * Callback function to receive the result of the getTeams operation. * @callback module:api/ListApi~getTeamsCallback * @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, paginated in groups of 500. * @param {Number} pageNum Page number of results to return, zero-indexed * @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/ListApi~getTeamsCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link Array.<module:model/Team>} */ }, { key: "getTeams", value: function getTeams(pageNum, opts, callback) { opts = opts || {}; var postBody = null; // verify the required parameter 'pageNum' is set if (pageNum === undefined || pageNum === null) { throw new Error("Missing the required parameter 'pageNum' when calling getTeams"); } var pathParams = { 'page_num': pageNum }; 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('/teams/{page_num}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback); } /** * Callback function to receive the result of the getTeamsByYear operation. * @callback module:api/ListApi~getTeamsByYearCallback * @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 year, paginated in groups of 500. * @param {Number} year Competition Year (or Season). Must be 4 digits. * @param {Number} pageNum Page number of results to return, zero-indexed * @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/ListApi~getTeamsByYearCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link Array.<module:model/Team>} */ }, { key: "getTeamsByYear", value: function getTeamsByYear(year, pageNum, 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 getTeamsByYear"); } // verify the required parameter 'pageNum' is set if (pageNum === undefined || pageNum === null) { throw new Error("Missing the required parameter 'pageNum' when calling getTeamsByYear"); } var pathParams = { 'year': year, 'page_num': pageNum }; 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('/teams/{year}/{page_num}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback); } /** * Callback function to receive the result of the getTeamsByYearKeys operation. * @callback module:api/ListApi~getTeamsByYearKeysCallback * @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 Team Keys that competed in the given year, paginated in groups of 500. * @param {Number} year Competition Year (or Season). Must be 4 digits. * @param {Number} pageNum Page number of results to return, zero-indexed * @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/ListApi~getTeamsByYearKeysCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link Array.<String>} */ }, { key: "getTeamsByYearKeys", value: function getTeamsByYearKeys(year, pageNum, 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 getTeamsByYearKeys"); } // verify the required parameter 'pageNum' is set if (pageNum === undefined || pageNum === null) { throw new Error("Missing the required parameter 'pageNum' when calling getTeamsByYearKeys"); } var pathParams = { 'year': year, 'page_num': pageNum }; 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('/teams/{year}/{page_num}/keys', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback); } /** * Callback function to receive the result of the getTeamsByYearSimple operation. * @callback module:api/ListApi~getTeamsByYearSimpleCallback * @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 list of short form `Team_Simple` objects that competed in the given year, paginated in groups of 500. * @param {Number} year Competition Year (or Season). Must be 4 digits. * @param {Number} pageNum Page number of results to return, zero-indexed * @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/ListApi~getTeamsByYearSimpleCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link Array.<module:model/TeamSimple>} */ }, { key: "getTeamsByYearSimple", value: function getTeamsByYearSimple(year, pageNum, 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 getTeamsByYearSimple"); } // verify the required parameter 'pageNum' is set if (pageNum === undefined || pageNum === null) { throw new Error("Missing the required parameter 'pageNum' when calling getTeamsByYearSimple"); } var pathParams = { 'year': year, 'page_num': pageNum }; 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('/teams/{year}/{page_num}/simple', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback); } /** * Callback function to receive the result of the getTeamsKeys operation. * @callback module:api/ListApi~getTeamsKeysCallback * @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, paginated in groups of 500. (Note, each page will not have 500 teams, but will include the teams within that range of 500.) * @param {Number} pageNum Page number of results to return, zero-indexed * @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/ListApi~getTeamsKeysCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link Array.<String>} */ }, { key: "getTeamsKeys", value: function getTeamsKeys(pageNum, opts, callback) { opts = opts || {}; var postBody = null; // verify the required parameter 'pageNum' is set if (pageNum === undefined || pageNum === null) { throw new Error("Missing the required parameter 'pageNum' when calling getTeamsKeys"); } var pathParams = { 'page_num': pageNum }; 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('/teams/{page_num}/keys', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback); } /** * Callback function to receive the result of the getTeamsSimple operation. * @callback module:api/ListApi~getTeamsSimpleCallback * @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 list of short form `Team_Simple` objects, paginated in groups of 500. * @param {Number} pageNum Page number of results to return, zero-indexed * @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/ListApi~getTeamsSimpleCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link Array.<module:model/TeamSimple>} */ }, { key: "getTeamsSimple", value: function getTeamsSimple(pageNum, opts, callback) { opts = opts || {}; var postBody = null; // verify the required parameter 'pageNum' is set if (pageNum === undefined || pageNum === null) { throw new Error("Missing the required parameter 'pageNum' when calling getTeamsSimple"); } var pathParams = { 'page_num': pageNum }; 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('/teams/{page_num}/simple', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback); } }]); return ListApi; }(); exports["default"] = ListApi;