README.md in link_oracle-0.0.6 vs README.md in link_oracle-0.0.7
- old
+ new
@@ -16,10 +16,44 @@
$ gem install link_oracle
## Usage
-TODO: Write usage instructions here
+To parse a link and extract information:
+
+```ruby
+link_data = LinkOracle.extract_from('http://example.com')
+```
+
+This will return a LinkData object. This object makes a a semi-intelligent guess about which image, title, and description to use. To access these defaults:
+
+```ruby
+title = link_data.title
+image_url = link_data.image_url
+description = link_data.description
+```
+
+The LinkData object also contains the parsed data:
+
+```ruby
+parsed_data = link_data.parsed_data
+```
+
+Finally, the LinkData object contains the results from individual sections broken into OpenGraph, Meta, and Body. If you are only interested in OpenGraph results:
+
+```ruby
+found_og_data = link_data.og
+title = found_og_data.title
+image_url = found_og_data.image
+description = found_og_data.description
+```
+
+For Meta or body:
+
+```ruby
+found_meta_data = link_data.meta
+found_body_data = link_data.body
+```
## Contributing
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)