npm: possibly marvellous

    everysport

    1.2.0 • Public • Published

    everysport-js

    NodeJS wrapper for the Everysport API.

    Example Usage

    var everysport = require("./everysport")(process.env.EVERYSPORT_APIKEY);
    
    var PINGISLIGAN_DAM = 72064,
        DIV_3_HERRAR = 72088,
        SPORT_BORDTENNIS = 8;
    
    /** Loads Bordtennis (table tennis) upcoming events */
    everysport.events
        .league(PINGISLIGAN_DAM, DIV_3_HERRAR)
        .status("upcoming")
        .load()
        .on("data", function (data) {
            console.log(data.startDate, data.homeTeam.name);
        })
        .on("error", function (err) {
            console.log(err);
        });
    
    /** Prints all Bordtennis (table tennis) leagues */
    everysport.leagues
        .sport(SPORT_BORDTENNIS)
        .load()
        .on("data", function (data) {
            console.log(data.name);
        });
    
    /** Prints all Everysport sports */
    everysport.sports
        .load()
        .on("data", function (data) {
            console.log(data);
        });
    
    /** Prints Pingisligan Standings */
    everysport
        .standings(PINGISLIGAN_DAM)
        .on('loaded', function (data) {
            console.log(data);
        });
    

    Command line

    Get the LeagueID from everysport.com as described here.

    Current standings

    everysport standings <leagueId>
    

    Upcoming events:

    everysport upcoming <leagueId>
    

    Install

    npm i everysport

    DownloadsWeekly Downloads

    7

    Version

    1.2.0

    License

    MIT License

    Last publish

    Collaborators

    • peterstark72