Skip to content
This repository was archived by the owner on Jul 21, 2022. It is now read-only.

nikeee/node-jodel-api

Repository files navigation

node-jodel-api Build Status npm version Dependency Status License

Node.js Jodel API, written in TypeScript

Archived as of 2022-07-21 due to missing capacity for maintaining this project. If you want to help maintaining this project, feel free to drop a mail!

Using the Library

npm install -S jodel-api

jodel-api comes with its own type definitions, no additional type references required.

import { JodelClient } from "jodel-api";

const config = null; // See Keys.md
async function main() {
    const client = new JodelClient(config);
    await client.login({
        city: "",
        country: "DE",
        locAccuracy: 10,
        locCoordinates: {
            lat: 123,
            lng: 456
        }
    });
    console.log("Logged in!");
    console.log("Token: " + client.accessToken);
    // the token can be passed to JodelClient#loginWithToken to use the same token to login back again.

    const res = await client.getKarma();
    console.log("Karma: " + res.karma);
}
main();

jodel-api uses node-fetch which is similar to the Fetch API of most browsers and therefore should be easy to rewrite.

About

Node.js Jodel API

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •