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

MIT.