Project

numbers

0.0
No commit activity in last 3 years
No release in over 3 years
API wrapper for number facts api
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Runtime

~> 0.9.0
~> 1.8
 Project Readme

Gem Version ##Summary

##Usage

####Install

gem install numbers

####Install Dependencies

gem install faraday
gem install json

####Require

require 'numbers'

####Get date fact

Numbers.date(21,6)
=> {"text"=>"September 6th is the day in 1963 that the Centre for International Industrial Property Studies (CEIPI) is founded.", 
	"year"=>1963, 
	"number"=>250, 
	"found"=>true, 
	"type"=>"date"}

####Get math fact

Numbers.math(25)
=> {"text"=>"25 is a square number, being 5² = 5 × 5.", 
	"number"=>25, 
	"found"=>true, 
	"type"=>"math"}

####Get random fact

Numbers.random
=> {"text"=>"April 25th is the day in 1792 that Highwayman Nicolas J. Pelletier becomes the first person executed by guillotine.", 
	"year"=>1792, 
	"number"=>116, 
	"found"=>true, 
	"type"=>"date"}

####Get trivia fact

Numbers.trivia(5)
=> {"text"=>"5 is the number of completed, numbered piano concertos of Ludwig van Beethoven, Sergei Prokofiev, and Camille Saint-Saëns.", 
	"number"=>5, 
	"found"=>true, 
	"type"=>"trivia"}

####Get year fact

Numbers.year(9)
=> {"text"=>"9 is the year that Wang Mang founds the short-lived Xin Dynasty in China (until 25).", 
	"number"=>9, 
	"found"=>true, 
	"type"=>"year"}

##Todo

  • tests