Class: Forem::Services::ProfileImageService

Inherits:
BaseService
  • Object
show all
Defined in:
lib/forem/services/profile_image_service.rb

Overview

Service for interacting with the Forem Profile Images API.

Retrieves profile image URLs for a given user or organization. Access via Client#profile_images. All methods inject the client's requestor automatically so no additional configuration is required.

Examples:

client = Forem::Client.new("your-api-key")
image_info = client.profile_images.retrieve("jsmith")

See Also:

Instance Method Summary collapse

Methods inherited from BaseService

#initialize

Constructor Details

This class inherits a constructor from Forem::Services::BaseService

Instance Method Details

#retrieve(username, opts = {}) ⇒ ProfileImage

Retrieve profile image details for a user or organization by username.

Examples:

image = client.profile_images.retrieve("jsmith")
puts image.profile_image

Parameters:

  • username (String)

    the username of the user or organization

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

    per-request options

Returns:

  • (ProfileImage)

    profile image data including the image URL

See Also:



27
28
29
# File 'lib/forem/services/profile_image_service.rb', line 27

def retrieve(username, opts = {})
  ProfileImage.retrieve(username, opts_with_requestor(opts))
end