This past week I learned how to use an API with Ruby! It is amazingly easy so here are the steps.
For ruby-toolbox, this is how your screen will look. This gives you information regarding the gem version, release date, bug tracker, pretty much all the info you could possibly want. Then it gives you the github link as well as the rdoc link.
When you click on the Rubygem, you be taken to this page https://rubygems.org/gems/twitter This gives you instructions on installing the gem. Pretty easy so far!
The documentation link (this link appears on both screens at step 2 and 3) re-directs you to the rdoc page that explains in detail the functions available to you with this gem.
This includes further installation instructions:
a quick start guide (with a link to registering your application so you don’t have to search around for that!):
….and the best part gives you usage examples that are INCREDIBLY helpful. This allows you to see all the methods available to you while using this gem. Pretty awesome!
After installing the gem, registering your application with Twitter, finish configuring with the authentication codes you received during registration. Follow the configuration format provided in the quickstart section listed previously. Don’t forget to require your gem in your ruby document.
That’s it! You are set up with the Twitter API gem. This instructions can easily work with any API you are hoping to use in your ruby code.