0.0.2 • Published 2 years ago

slekup-api v0.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

Slekup API

A JavaScript library for interacting with Slekup API.

Slekup API is a powerful multi-purpose API that allows for fast and easy integration of a wide range of features and external services into your application.

Resources

Getting started

Installation

npm install slekup-api

Usage

Initialize the client with your token.

import { Client } from 'slekup-api';

const client = new Client({
  token: 'YOUR_TOKEN',
  version: 1,
});

client.login().then(() => {
  console.log('Logged in!');
});

Getting a random joke

client.jokes
  .random()
  .then((joke) => {
    console.log(joke);
  })
  .catch((err) => {
    console.error(err);
  });

Log debug messages

client.on('debug', (message) => {
  console.log(message);
});