0.2.6 • Published 4 years ago

nevobo-js v0.2.6

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

NevoboJS

NevoboJS is an attempt to make the Nevobo v1 API easier to use.

The only official documentation of their API I could find is outdated, as their new Android App uses the v1 version, which is not documented anywhere to my knowledge.

Features

  • Get information about Poules, Teams, Wedstrijden, Resultaten, Sporthallen
  • Search function
  • Works in Node.js and in Browser
  • Built-in Typescript support

Roadmap

  • Implement all known API endpoints
  • Combine calls to increase ease of use
    • Get Programma for Team
    • Get Schedule for Team
    • Get Ranking for Team
  • Confirm match results are working when the season starts

Usage

Each call returns a Promise of a custom NevoboResponse:

export type NevoboResponse<T> = {
    success: boolean,
    reason?: string,
    data?: T,
}

Example usage

import NevoboJs from "nevobo-js";

const NevoboClient = new NevoboJs()

NevoboClient.getSportHallenForVereniging("ckl9m4l").then((response) => {
    if (response.success) {
        console.log(response.data);
    } else {
        console.log(response.reason);
    }
});

NevoboClient.getTeamsForVereniging("ckl9m4l").then((response) => {
    if (response.success) {
       console.log(`Found ${response.data.length} teams!`);
    } else {
        console.log(response.reason);
    }
});

Contributing

This is my first attempt at creating an API client, so things are guaranteed to not work perfectly. If you notice anything is broken, please open an issue or submit a pull request!

FAQ

Q: Why is the codebase a mix of Dutch and English? A: All variables and classes follow the names from the Nevobo API, blame them.

Q: I just want the rankings for a specific team. A: First use getPoules(team), then use getPouleIndelingen(poule) to get the standings.

Credits

The design of this client was heavily inspired by ilyamkin.

0.2.6

4 years ago

0.2.5

4 years ago

0.2.4

4 years ago

0.2.3

4 years ago

0.2.1

4 years ago

0.2.2

4 years ago

0.2.0

4 years ago

0.1.0

4 years ago