An open API service indexing awesome lists of open source software.

https://github.com/rorpage/factors

simple API for getting factors
https://github.com/rorpage/factors

Last synced: 21 days ago
JSON representation

simple API for getting factors

Awesome Lists containing this project

README

          

# factors
A very simple API for getting factors of a number.

1. Run `bundle install` to install the required gems.
1. The Procfile can be used to deploy to Heroku.

Going to /api will give a JSON response with the current year's factors. You can append a number to the end to get factors of whatever number you like.

For instance:


`localhost:4567/api/360` will return


`{"factors":[1,2,3,4,5,6,8,9,10,12,15,18,20,24,30,36,40,45,60,72,90,120,180,360]}`