npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@datafire/fungenerators_random_facts

v3.0.0

Published

DataFire integration for Facts API

Downloads

6

Readme

@datafire/fungenerators_random_facts

Client library for Facts API

Installation and Usage

npm install --save @datafire/fungenerators_random_facts
let fungenerators_random_facts = require('@datafire/fungenerators_random_facts').create({
  "X-Fungenerators-Api-Secret": ""
});

.then(data => {
  console.log(data);
});

Description

A full featured Facts API. REST access with json/xml/jsonp result support. On this day birth and death support, random fact, keyword search support etc. Below is the documentation for the Random Facts API calls. You can try them out right here. Click here to subscribe

Actions

fact.delete

Delete a Fact entry identified by the id.

fungenerators_random_facts.fact.delete({
  "id": ""
}, context)

Input

  • input object
    • id required string: Fact ID

Output

Output schema unknown

fact.get

Get a Fact belonging to the id.

fungenerators_random_facts.fact.get({}, context)

Input

  • input object
    • id string: ID of the fact to fetch

Output

Output schema unknown

fact.put

Add a Fact entry to the database (private collection).

fungenerators_random_facts.fact.put({
  "fact": "",
  "category": "",
  "subcategory": "",
  "tags": ""
}, context)

Input

  • input object
    • fact required string: Fact Text
    • category required string: Category of the fact
    • subcategory required string: Sub Category of the fact
    • tags required string: Tags

Output

Output schema unknown

fact.categories.get

Get a random Fact.

fungenerators_random_facts.fact.categories.get({}, context)

Input

  • input object
    • start integer: start

Output

Output schema unknown

fact.fod.get

Get fact of the day for the given category.

fungenerators_random_facts.fact.fod.get({}, context)

Input

  • input object
    • category string: Category to get the fact of the day from. Must be one from the list returned from /fact/fod/categories

Output

Output schema unknown

fact.fod.categories.get

Get the list of supported fact of the day categories.

fungenerators_random_facts.fact.fod.categories.get(null, context)

Input

This action has no parameters

Output

Output schema unknown

fact.numbers.get

Get a random fact about a number

fungenerators_random_facts.fact.numbers.get({
  "number": 0
}, context)

Input

  • input object
    • number required integer: Number value

Output

Output schema unknown

fact.onthisday.born.get

Returns a random ( famous/ relatively famous ) person born on a given day and month

fungenerators_random_facts.fact.onthisday.born.get({}, context)

Input

  • input object
    • month string: Optional month (1-12). Defaults to current month
    • day string: Optional day of the month (1- 28/30/31 based on the month). Defaults to current day of the month.

Output

Output schema unknown

fact.onthisday.died.get

Returns a random ( famous/ relatively famous ) person died on a given day and month

fungenerators_random_facts.fact.onthisday.died.get({}, context)

Input

  • input object
    • month string: Optional month (1-12). Defaults to current month
    • day string: Optional day of the month (1- 28/30/31 based on the month). Defaults to current day of the month.

Output

Output schema unknown

fact.onthisday.event.get

Returns a random ( famous/ relatively famous ) historic event on a given day and month

fungenerators_random_facts.fact.onthisday.event.get({}, context)

Input

  • input object
    • month string: Optional month (1-12). Defaults to current month
    • day string: Optional day of the month (1- 28/30/31 based on the month). Defaults to current day of the month.

Output

Output schema unknown

fact.random.get

Get a random Fact for a given category(optional) and subcategory(optional).

fungenerators_random_facts.fact.random.get({}, context)

Input

  • input object
    • category string: Category to get the fact from
    • subcategory string: Sub Category to get the fact from

Output

Output schema unknown

fact.search.get

Search for random Fact which has the text in the query, for a given category(optional) and subcategory(optional).

fungenerators_random_facts.fact.search.get({}, context)

Input

  • input object
    • query string: Text to search for in the facts
    • category string: Category to get the fact from
    • subcategory string: Sub Category to get the fact from

Output

Output schema unknown

Definitions

This integration has no definitions