FindSiteIcon.Util.IconUtils (FindSiteIcon v0.3.6) View Source

Utilities for working with icon info

Link to this section Summary

Link to this section Functions

Specs

expired?(any()) :: boolean()
Link to this function

extract_header(headers, header_name)

View Source

Specs

extract_header([{binary(), binary()}], binary()) :: binary() | nil
Link to this function

generate_expiration_timestamp(cache_control)

View Source

Specs

generate_expiration_timestamp(any()) :: DateTime.t()
Link to this function

generate_info(arg1, icon_url)

View Source

Specs

generate_info({:ok, 200, [{binary(), binary()}]} | nil, binary()) ::
  %FindSiteIcon.IconInfo{
    expiration_timestamp: term(),
    size: term(),
    url: term()
  }
  | nil
Link to this function

generate_size(content_length)

View Source

Specs

generate_size(any()) :: integer() | nil

Specs

icon_info_for(binary() | nil) ::
  %FindSiteIcon.IconInfo{
    expiration_timestamp: term(),
    size: term(),
    url: term()
  }
  | nil
Link to this function

reject_bad_content_type(response)

View Source

Specs

reject_bad_content_type(any()) :: nil | {:ok, 200, [{binary(), binary()}]}

Specs

unexpired?(any()) :: boolean()