Sha256: a70911da7289d40843247ce7c41392511c93ef996fbeac1670980d0bd7f338b1

Contents?: true

Size: 813 Bytes

Versions: 22

Compression:

Stored size: 813 Bytes

Contents

# frozen_string_literal: true

class Gitlab::Client
  # Defines methods related to avatar.
  # @see https://docs.gitlab.com/ce/api/avatar.html
  module Avatar
    # Get a single avatar URL for a user with the given email address.
    #
    # @example
    #   Gitlab.avatar(email: 'admin@example.com')
    #   Gitlab.avatar(email: 'admin@example.com', size: 32)
    #
    # @param  [Hash] options A customizable set of options.
    # @option options [String] :email(required) Public email address of the user.
    # @option options [Integer] :size(optional) Single pixel dimension (since images are squares). Only used for avatar lookups at Gravatar or at the configured Libravatar server.
    # @return <Gitlab::ObjectifiedHash>
    def avatar(options = {})
      get('/avatar', query: options)
    end
  end
end

Version data entries

22 entries across 22 versions & 2 rubygems

Version Path
gitlab-5.1.0 lib/gitlab/client/avatar.rb
gitlab-5.0.0 lib/gitlab/client/avatar.rb
gitlab-4.20.1 lib/gitlab/client/avatar.rb
gitlab-4.20.0 lib/gitlab/client/avatar.rb
fs-gitlab-4.19.3 lib/gitlab/client/avatar.rb
fs-gitlab-4.19.2 lib/gitlab/client/avatar.rb
fs-gitlab-4.19.1 lib/gitlab/client/avatar.rb
gitlab-4.19.0 lib/gitlab/client/avatar.rb
fs-gitlab-4.18.2 lib/gitlab/client/avatar.rb
fs-gitlab-4.18.1 lib/gitlab/client/avatar.rb
gitlab-4.18.0 lib/gitlab/client/avatar.rb
gitlab-4.17.0 lib/gitlab/client/avatar.rb
gitlab-4.16.1 lib/gitlab/client/avatar.rb
gitlab-4.16.0 lib/gitlab/client/avatar.rb
gitlab-4.15.0 lib/gitlab/client/avatar.rb
gitlab-4.14.1 lib/gitlab/client/avatar.rb
gitlab-4.14.0 lib/gitlab/client/avatar.rb
gitlab-4.13.1 lib/gitlab/client/avatar.rb
gitlab-4.13.0 lib/gitlab/client/avatar.rb
gitlab-4.12.0 lib/gitlab/client/avatar.rb