README.md in uncoil-1.1.0 vs README.md in uncoil-1.2.0

- old
+ new

@@ -4,11 +4,11 @@ The uncoil gem is a one stop shop for un-shortening urls. The idea is based off of my site http://uncoil.me and I built this as part of my UWE-Ruby fall project. -## Why the heck does this exist? +### Why the heck does this exist? This gem is all about transparency, safety and knowing where you are going on the internet. The last straw was seeing TechCrunch articles with titles like "Don't click on this one specific goo.gl link! It's a virus!" (like [this](http://techcrunch.com/2010/12/07/twitter-virus/) one), which was flabbergasting. How is it that a tech blog and community's only response to these kind of threats is so reactionary and linear? **We can do better than that.** There are a few instances where it may come in handy: @@ -27,10 +27,21 @@ ```ruby require 'uncoil' ``` ## Usage + +### One-off Calls +If you want to just make a single call, give this a try: + +```ruby +Uncoil.expand('http://bit.ly/2EEjBl') # => <Uncoil::Response:0x00000100a0d948 @long_url="http://www.cnn.com/" @short_url="http://bit.ly/2EEjBl" @error=nil> +``` + +### Creating an Instance +If you need to make repeated calls or would like to access the bitly api, you need to create an instance. + * If you have Bitly login credentials, use them to create a new instance: ```ruby @a = Bitly.new(:bitlyuser => 'YOURAPIUSERNAME', :bitlykey => 'YOURAPIKEY') # Or if you don't have any auth criteria @@ -74,5 +85,17 @@ * These seem to be faster than a general HTTP request loop * Modularized structure with each API's content in its own file * Dynamic method assignment based on domain. * This goes with the modularized structure above, because it allows you to just drop more API files into the folder and not have to modify the main method * Better error handling (I'd appreciate any comments on what to catch and what to leave) + +## License + +The MIT License (MIT) + +Copyright (c) 2012 Joel Stimson + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.