UNPKG

fantasy-api-client

Version:

API client to easily interact with various fantasy sports APIs including ESPN, Yahoo, and Sleeper

12 lines (11 loc) 409 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); /* tslint:disable */ var fetch = require('node-fetch'); var error_1 = require("./error"); function fetchData(url) { return fetch(url) .then(function (res) { return res.json().then(function (json) { return (0, error_1.default)(json); }); }) .then(function (data) { return data; }); } exports.default = fetchData;