fake_name_generator - a light weight Ruby wrapper for the FakeNameGenerator.com API
This is a fairly simple Ruby wrapper for the FakeNameGenerator.com API. The API returns a full name, an address, fake credit card numbers, blood type(!), weight, and even a fake UPS number.
When I first thought of putting together this API wrapper for FakeNameGenerator.com, they had a free API unless you needed to bulk load generated names (> 10,000). Since then, they've handed over the API-handling duties to a third party named WebServius <www.webservius.com/corp/>.
Now, there is a limit of 50 free API calls upon signing up, and then after that API results cost $0.001 per additional 50 requests. It's certainly not an outrageous cost, but, alas, it's no longer a free API.
It's also my first attempt at a Ruby wrapper for a web service API, so there are most likely inefficiencies and some bad code. I certainly appreciate any feedback anyone could provide. See the Contributing section below.
In order to use the FakeNameGenerator API, you will need to acquire an API key from FakeNameGenerator.com at <www.fakenamegenerator.com/api.php>. The API key actually comes from WebServius (as mentioned above), but the entrance is through the FakeNameGenerator website.
[sudo] gem install fake_name_generator
> fake_name = FakeNameGenerator.new(:api_key => 'VALID_KEY') > puts fake_name.full_name "Ignatius J. Reilly" > puts fake_name.blood_type "A-"
This is my first attempt at a API-wrapping gem. There are certainly better ways to do this.
Maybe detach the HTTP call from .new(), and move to its own method.
I would love some help and pointers on how to make this a better gem.
Fork the project
Please create a topic branch to make your changes
Change, add, improve, upgrade, etc
Please add tests for anything you've added, and adjust tests for things you've changed
Make sure you rebase off of master one last time
Send a pull request on GitHub
Bill Turner <firstname.lastname@example.org>
Jim Meyer <github.com/purp/>
MIT License. Copyright 2011 Bill Turner. Please see LICENSE.