object

gravatar

Portable Gravatar profile client using the Gravatar REST API.

Availability:
logtalk_load(gravatar(loader))
Author: Paulo Moura
Version: 1:0:0
Date: 2026-07-13
Compilation flags:
static, context_switching_calls
Remarks:
(none)

Public predicates

profile/2

Retrieves a Gravatar profile JSON object for an email address using default options.

Compilation flags:
static
Template:
profile(Email,Profile)
Mode and number of proofs:
profile(+atom,-term) - one_or_error
Exceptions:
Email is a variable:
instantiation_error
Email is neither a variable nor an atom:
type_error(atom,Email)
The Gravatar API returns a non-success response:
gravatar_api_error(Status,Body)

profile/3

Retrieves a Gravatar profile JSON object for an email address using the given options.

Compilation flags:
static
Template:
profile(Email,Profile,Options)
Mode and number of proofs:
profile(+atom,-term,+list(compound)) - one_or_error
Exceptions:
Email is a variable:
instantiation_error
Email is neither a variable nor an atom:
type_error(atom,Email)
Options is a variable or a partial list:
instantiation_error
Options is neither a variable nor a list:
type_error(list,Options)
An element Option of the list Options is neither a variable nor a compound term:
type_error(compound,Option)
An element Option of the list Options is a compound term but not a valid option:
domain_error(option,Option)
The Gravatar API returns a non-success response:
gravatar_api_error(Status,Body)
Remarks:
  • Option api_key(APIKey): Uses the given Gravatar API key as a Bearer token. When absent, the LOGTALK_GRAVATAR_API_KEY environment variable is used when defined.

  • Option base_url(URL): Overrides the Gravatar API base URL. The default is https://api.gravatar.com/v3.

  • HTTP options: Options headers/1, version/1, properties/1, and connection_options/1 are forwarded to the HTTP client.


profile_response/3

Retrieves the raw normalized HTTP response for a Gravatar profile request.

Compilation flags:
static
Template:
profile_response(Email,Response,Options)
Mode and number of proofs:
profile_response(+atom,-compound,+list(compound)) - one_or_error
Exceptions:
Email is a variable:
instantiation_error
Email is neither a variable nor an atom:
type_error(atom,Email)
Options is a variable or a partial list:
instantiation_error
Options is neither a variable nor a list:
type_error(list,Options)
An element Option of the list Options is neither a variable nor a compound term:
type_error(compound,Option)
An element Option of the list Options is a compound term but not a valid option:
domain_error(option,Option)

email_hash/2

Computes the Gravatar SHA-256 email hash after trimming leading and trailing whitespace and lowercasing ASCII letters.

Compilation flags:
static
Template:
email_hash(Email,Hash)
Mode and number of proofs:
email_hash(+atom,-atom) - one_or_error
Exceptions:
Email is a variable:
instantiation_error
Email is neither a variable nor an atom:
type_error(atom,Email)

field/3

Returns a top-level field from a decoded Gravatar profile JSON object.

Compilation flags:
static
Template:
field(Profile,Field,Value)
Mode and number of proofs:
field(+term,+atom,?term) - zero_or_one

hash/2

Returns the Gravatar profile hash field.

Compilation flags:
static
Template:
hash(Profile,Value)
Mode and number of proofs:
hash(+term,?term) - zero_or_one

display_name/2

Returns the Gravatar profile display name field.

Compilation flags:
static
Template:
display_name(Profile,Value)
Mode and number of proofs:
display_name(+term,?term) - zero_or_one

profile_url/2

Returns the Gravatar profile URL field.

Compilation flags:
static
Template:
profile_url(Profile,Value)
Mode and number of proofs:
profile_url(+term,?term) - zero_or_one

avatar_url/2

Returns the Gravatar avatar URL field.

Compilation flags:
static
Template:
avatar_url(Profile,Value)
Mode and number of proofs:
avatar_url(+term,?term) - zero_or_one

avatar_alt_text/2

Returns the Gravatar avatar alternative text field.

Compilation flags:
static
Template:
avatar_alt_text(Profile,Value)
Mode and number of proofs:
avatar_alt_text(+term,?term) - zero_or_one

location/2

Returns the Gravatar profile location field.

Compilation flags:
static
Template:
location(Profile,Value)
Mode and number of proofs:
location(+term,?term) - zero_or_one

job_title/2

Returns the Gravatar profile job title field.

Compilation flags:
static
Template:
job_title(Profile,Value)
Mode and number of proofs:
job_title(+term,?term) - zero_or_one

company/2

Returns the Gravatar profile company field.

Compilation flags:
static
Template:
company(Profile,Value)
Mode and number of proofs:
company(+term,?term) - zero_or_one

description/2

Returns the Gravatar profile description field.

Compilation flags:
static
Template:
description(Profile,Value)
Mode and number of proofs:
description(+term,?term) - zero_or_one

pronouns/2

Returns the Gravatar profile pronouns field.

Compilation flags:
static
Template:
pronouns(Profile,Value)
Mode and number of proofs:
pronouns(+term,?term) - zero_or_one

verified_accounts/2

Returns the Gravatar profile verified accounts field.

Compilation flags:
static
Template:
verified_accounts(Profile,Value)
Mode and number of proofs:
verified_accounts(+term,?term) - zero_or_one

section_visibility/2

Returns the Gravatar profile section visibility field.

Compilation flags:
static
Template:
section_visibility(Profile,Value)
Mode and number of proofs:
section_visibility(+term,?term) - zero_or_one

Protected predicates

(no local declarations; see entity ancestors if any)

Private predicates

(no local declarations; see entity ancestors if any)

Operators

(none)