Skip to content

Commit

Permalink
add usage in README file
Browse files Browse the repository at this point in the history
  • Loading branch information
gravityblast committed May 9, 2016
1 parent fd87c3d commit 510ebd1
Showing 1 changed file with 26 additions and 10 deletions.
36 changes: 26 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,36 @@
# Gravatar

**TODO: Add description**
Gravatar URLs module for Elixir.

## Installation

If [available in Hex](https://hex.pm/docs/publish), the package can be installed as:
```elixir
def deps do
[{:gravatar, "~> 0.0.1"}]
end
```

1. Add gravatar to your list of dependencies in `mix.exs`:
## Usage

def deps do
[{:gravatar, "~> 0.0.1"}]
end
```elixir
iex(1)> Gravatar.new("test@example.com") |> to_string
"http://www.gravatar.com/avatar/55502f40dc8b7c769880b10874abc9d0"

2. Ensure gravatar is started before your application:
iex(2)> Gravatar.new("test@example.com") |> Gravatar.size(500) |> to_string
"http://www.gravatar.com/avatar/55502f40dc8b7c769880b10874abc9d0?s=500"

def application do
[applications: [:gravatar]]
end
iex(3)> Gravatar.new("test@example.com") |> Gravatar.size(500) |> Gravatar.secure |> to_string
"https://www.gravatar.com/avatar/55502f40dc8b7c769880b10874abc9d0?s=500"
```

## Author

* [Andrea Franz](http://gravityblast.com)

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

0 comments on commit 510ebd1

Please sign in to comment.