UNPKG

cfb.js

Version:

This_is_an_API_for_accessing_all_sorts_of_college_football_data___Please_note_that_API_keys_should_be_supplied_with_Bearer__prepended__e_g__Bearer_your_key__API_keys_can_be_acquired_from_the_CollegeFootballData_com_website_

99 lines (86 loc) 2.85 kB
/* * College Football Data API * This is an API for accessing all sorts of college football data. Please note that API keys should be supplied with \"Bearer \" prepended (e.g. \"Bearer your_key\"). API keys can be acquired from the CollegeFootballData.com website. * * OpenAPI spec version: 4.3.2 * Contact: admin@collegefootballdata.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * * Swagger Codegen version: 2.4.24 * * Do not edit the class manually. * */ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. Register as an anonymous module. define(['ApiClient', 'model/Venue'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. module.exports = factory(require('../ApiClient'), require('../model/Venue')); } else { // Browser globals (root is window) if (!root.cfb) { root.cfb = {}; } root.cfb.VenuesApi = factory(root.cfb.ApiClient, root.cfb.Venue); } }(this, function(ApiClient, Venue) { 'use strict'; /** * Venues service. * @module api/VenuesApi * @version 4.3.2 */ /** * Constructs a new VenuesApi. * @alias module:api/VenuesApi * @class * @param {module:ApiClient} [apiClient] Optional API client implementation to use, * default to {@link module:ApiClient#instance} if unspecified. */ var exports = function(apiClient) { this.apiClient = apiClient || ApiClient.instance; /** * Arena and venue information * Venues * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:model/Venue>} and HTTP response */ this.getVenuesWithHttpInfo = function() { var postBody = null; var pathParams = { }; var queryParams = { }; var collectionQueryParams = { }; var headerParams = { }; var formParams = { }; var authNames = ['ApiKeyAuth']; var contentTypes = []; var accepts = ['application/json']; var returnType = [Venue]; return this.apiClient.callApi( '/venues', 'GET', pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType ); } /** * Arena and venue information * Venues * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/Venue>} */ this.getVenues = function() { return this.getVenuesWithHttpInfo() .then(function(response_and_data) { return response_and_data.data; }); } }; return exports; }));