Skip to content

Commit

Permalink
Added description and usage examples
Browse files Browse the repository at this point in the history
  • Loading branch information
lora-reames committed Apr 13, 2014
1 parent 55699f5 commit f71224e
Showing 1 changed file with 23 additions and 3 deletions.
26 changes: 23 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Leaflyapi

[![build status](https://secure.travis-ci.org/patrickr/leaflyapi.png)](http://travis-ci.org/patrickr/leaflyapi) [![Coverage Status](https://coveralls.io/repos/patrickr/leaflyapi/badge.png?branch=master)](https://coveralls.io/r/patrickr/leaflyapi?branch=master)
[![build status](https://secure.travis-ci.org/patrickr/leaflyapi.png)](http://travis-ci.org/patrickr/leaflyapi) [![Coverage Status](https://coveralls.io/repos/patrickr/leaflyapi/badge.png?branch=master)](https://coveralls.io/r/patrickr/leaflyapi?branch=master) [![Gem Version](https://badge.fury.io/rb/leaflyapi.png)](http://badge.fury.io/rb/leaflyapi)

TODO: Write a gem description
A simple ruby gem to help you enteract with the [leafly.com](http://www.leafly.com/) API.

Currently it lets you retrieve strains and read their attributes but it may do more eventually.

## Installation

Expand All @@ -19,8 +21,26 @@ Or install it yourself as:
$ gem install leaflyapi

## Usage
```ruby
require 'leaflyapi'

# lets get ALL of the strains
strains = Leaflyapi::Strains.all

# now we have an array full of strain objects
strains.class => Array

# it respondes to all of Array's methods so we can iterate over it and do whatever we like
strains.each { |strain| p strain.name } # would print out all the strain names
strains.each do |strain| # so would this
p strain.name
end

# and we can read their attributes easily
strains.first.name # returns the name of the first strain.
strains.first.description # returns the description of the first strain.

TODO: Write usage instructions here
```

## Contributing

Expand Down

0 comments on commit f71224e

Please sign in to comment.