This repository has been archived by the owner. It is now read-only.
Ruby gem for Avatars.io API
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib dumb mistake, again Jul 10, 2012
test oh, not again Jul 10, 2012
.gitignore Initial commit Jun 26, 2012
Gemfile init Jun 26, 2012
Gemfile.lock init Jun 26, 2012
LICENSE.txt init Jun 26, 2012
README.md license Jul 28, 2012
Rakefile init Jun 26, 2012
VERSION Version bump to 0.1.5 Jul 10, 2012
avatars.io.gemspec Regenerate gemspec for version 0.1.5 Jul 10, 2012

README.md

Avatars.io Ruby client

Hosted User Avatar Service for your Apps and Site.

Installation

gem install avatars.io

or

gem 'avatars.io'

in Bundler.

Usage

require 'avatars.io'

# Getting links to avatars in social networks

avatar_url('twitter', 'vdemedes') # returns 'http://avatars.io/twitter/vdemedes', twitter, instagram and facebook are available
avatar_url('instagram', 'vdemedes')
avatar_url('facebook', 'vdemedes')

# Uploading own avatars

AvatarsIO.client_id = 'your client id'
AvatarsIO.access_token = 'your access token'

AvatarsIO.upload 'path/to/image.jpg' # http://avatars.io/ast3423

# with ability to assign custom identifiers

AvatarsIO.upload 'path/to/another/image.jpg', 'very-nice-image' # http://avatars.io/23434thfsds7dhfsdf/very-nice-image

Tests

Run tests by executing rake test in Terminal.

License

© Chute Corporation.