OpenXchangeClient.Api.Image (open_xchange_client v0.10.0)

API calls for all endpoints tagged Image.

Link to this section Summary

Functions

Requests an image that was previously uploaded with the ajax file upload module.

Requests an image for a trusted mail

Requests a user's profile image.

Link to this section Functions

Link to this function

get_contact_profile_image(connection, folder, id, opts \\ [])

@spec get_contact_profile_image(Tesla.Env.client(), String.t(), integer(), keyword()) ::
  {:ok, nil} | {:ok, String.t()} | {:error, Tesla.Env.t()}

Requests a contact's profile image.

Important:

parameters

Parameters

  • connection (OpenXchangeClient.Connection): Connection to server
  • folder (String.t): The folder ID in which the contact resides.
  • id (integer()): The object ID of the contact.
  • opts (KeywordList): [optional] Optional parameters
    • :transformation_needed (boolean()): Indicate if the image needs to be transformed.
    • :crop_width (integer()): The width a cropped image should have. Needs to be a bigger value than the images width.
    • :crop_height (integer()): The height a cropped image should have. Needs to be a bigger value than the images hight.
    • :rotate (boolean()): Indicate if the image should get rotated
    • :compress (boolean()): Indicate if the image should be compressed. Output format depends on scaleType.
    • :width (integer()): The maximum width of the target image. Can not be greater than the value set in 'com.openexchange.tools.images.maxWidth'. Default is 4096.
    • :height (integer()): The maximum height of the target image. Can not be greater than the value set in 'com.openexchange.tools.images.maxHeight'. Default is 4096.
    • :shrink_only (boolean()): Set to 'true' to only scale images 'greater than' target size
    • :scale_type (String.t): The scale type to use.

returns

Returns

on success {:error, Tesla.Env.t} on failure

Link to this function

get_inline_mail_image(connection, folder, id, uid, opts \\ [])

@spec get_inline_mail_image(
  Tesla.Env.client(),
  String.t(),
  String.t(),
  String.t(),
  keyword()
) ::
  {:ok, nil} | {:ok, String.t()} | {:error, Tesla.Env.t()}

Requests an inline image from a mail.

parameters

Parameters

  • connection (OpenXchangeClient.Connection): Connection to server
  • folder (String.t): The folder ID in which the mail resides.
  • id (String.t): The object ID of the mail.
  • uid (String.t): The identifier of the image inside the referenced mail.
  • opts (KeywordList): [optional] Optional parameters
    • :account_id (integer()): The mail account identifier

returns

Returns

on success {:error, Tesla.Env.t} on failure

Link to this function

get_managed_image_file(connection, uid, opts \\ [])

@spec get_managed_image_file(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, nil} | {:ok, String.t()} | {:error, Tesla.Env.t()}

Requests an image that was previously uploaded with the ajax file upload module.

parameters

Parameters

  • connection (OpenXchangeClient.Connection): Connection to server
  • uid (String.t): The identifier of the uploaded image.
  • opts (KeywordList): [optional] Optional parameters

returns

Returns

on success {:error, Tesla.Env.t} on failure

Link to this function

get_mp3_cover_image(connection, id, opts \\ [])

@spec get_mp3_cover_image(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, nil} | {:ok, String.t()} | {:error, Tesla.Env.t()}

Requests a MP3 cover image.

parameters

Parameters

  • connection (OpenXchangeClient.Connection): Connection to server
  • id (String.t): The identifier of the uploaded image.
  • opts (KeywordList): [optional] Optional parameters

returns

Returns

on success {:error, Tesla.Env.t} on failure

Link to this function

get_trusted_mail_picture(connection, uid, opts \\ [])

@spec get_trusted_mail_picture(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, nil} | {:ok, String.t()} | {:error, Tesla.Env.t()}

Requests an image for a trusted mail

parameters

Parameters

  • connection (OpenXchangeClient.Connection): Connection to server
  • uid (String.t): The identifier of the image previously obtained from the authentication_results field of the mail module.
  • opts (KeywordList): [optional] Optional parameters

returns

Returns

on success {:error, Tesla.Env.t} on failure

Link to this function

get_user_profile_image(connection, id, opts \\ [])

@spec get_user_profile_image(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, nil} | {:ok, String.t()} | {:error, Tesla.Env.t()}

Requests a user's profile image.

Important:

parameters

Parameters

  • connection (OpenXchangeClient.Connection): Connection to server
  • id (String.t): The object ID of the user.
  • opts (KeywordList): [optional] Optional parameters
    • :transformation_needed (boolean()): Indicate if the image needs to be transformed.
    • :crop_width (integer()): The width a cropped image should have. Needs to be a bigger value than the images width.
    • :crop_height (integer()): The height a cropped image should have. Needs to be a bigger value than the images hight.
    • :rotate (boolean()): Indicate if the image should get rotated
    • :compress (boolean()): Indicate if the image should be compressed. Output format depends on scaleType.
    • :width (integer()): The maximum width of the target image. Can not be greater than the value set in 'com.openexchange.tools.images.maxWidth'. Default is 4096.
    • :height (integer()): The maximum height of the target image. Can not be greater than the value set in 'com.openexchange.tools.images.maxHeight'. Default is 4096.
    • :shrink_only (boolean()): Set to 'true' to only scale images 'greater than' target size
    • :scale_type (String.t): The scale type to use.

returns

Returns

on success {:error, Tesla.Env.t} on failure