Module: Gitlab::Client::Avatar

Included in:
Gitlab::Client
Defined in:
lib/gitlab/client/avatar.rb

Overview

Defines methods related to avatar.

Instance Method Summary collapse

Instance Method Details

#avatar(options = {}) ⇒ Gitlab::ObjectifiedHash

Get a single avatar URL for a user with the given email address.

Examples:

Gitlab.avatar(email: '[email protected]')
Gitlab.avatar(email: '[email protected]', size: 32)

Parameters:

  • options (Hash) (defaults to: {})

    A customizable set of options.

Options Hash (options):

  • :email(required) (String)

    Public email address of the user.

  • :size(optional) (Integer)

    Single pixel dimension (since images are squares). Only used for avatar lookups at Gravatar or at the configured Libravatar server.

Returns:


17
18
19
# File 'lib/gitlab/client/avatar.rb', line 17

def avatar(options = {})
  get('/avatar', query: options)
end