Method: Appwrite::Avatars#get_favicon

Defined in:
lib/appwrite/services/avatars.rb

#get_favicon(url:) ⇒ Object

Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.

This endpoint does not follow HTTP redirects.

Parameters:

  • url (String)

    Website URL which you want to fetch the favicon from.

Returns:



103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# File 'lib/appwrite/services/avatars.rb', line 103

def get_favicon(url:)
    api_path = '/avatars/favicon'

    if url.nil?
      raise Appwrite::Exception.new('Missing required parameter: "url"')
    end

    api_params = {
        url: url,
    }
    
    api_headers = {
    }

    @client.call(
        method: 'GET',
        path: api_path,
        headers: api_headers,
        params: api_params,
    )
end