Socket
Socket
Sign inDemoInstall

stamina-api

Package Overview
Dependencies
81
Maintainers
2
Versions
21
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    stamina-api

Npm module can make jokes generator and other. This module is for Stamina website and game. - Only Stamina's developpers: Can manage Stamina's infrastructure.


Version published
Weekly downloads
0
decreased by-100%
Maintainers
2
Install size
1.44 MB
Created
Weekly downloads
 

Readme

Source

Discord NPM Download

Stamina API

Ce paquet Npm fourni une interface pour intéragir avec l'API de Stamina

Installation

Vous pouvez simplement installer la dépendance à votre projet depuis Npm :

$ npm install stamina-api

Mise en place

Importation

const Stamina = require('stamina-api');

Utilisation

Blague aléatoire

const blague = await Stamina.get("jokes").byType("random")

Avec cette méthode, vous pouvez spécifier certains types que vous ne souhaitez pas recevoir.

const blague = await Stamina.get("jokes").byType("random", {
  disallow: ['dark', 'limit']
});

Blague aléatoire d'une catégorie

const blague = await Stamina.get("jokes").byType('dev');

Blague à partir de son ID

Les blagues sont identifiées par un ID que vous recevez en même tant que chaque blague.

Spécifiez cet identifiant en paramètre et vous l’obtiendrez à nouveau.

const blague = await Stamina.get("jokes").byID(50);

Valeur retournée

// console.log(blague);

{
  "id": 1,
  "type": "dev",
  "content": {
    "blague": "Question.",
    "reponse": "Réponse."
  }
}

Keywords

FAQs

Last updated on 05 Dec 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc