class

Kagi::Object::Image

Inherits JSON::Serializable < Reference < Object

An image associated with a search result. The URLs are proxied through Kagi's servers, and provide a path from https://kagi.com to the image. This proxied URL is provided at #proxy_url here, and a full URL is returned by #url

https://help.kagi.com/kagi/api/search.html#image

https://help.kagi.com/kagi/api/intro/image-proxy-urls.html

Constructors

new(pull : JSON::PullParser)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

height

@[JSON::Field(key: "height", converter: Int32)] Height of the image in pixels

Source
proxy_url

The path of the proxied image, /proxy/filename.jpg?c=HASH

Source
url

The full url of the proxied image, https://kagi.com/proxy/filename.jpg?c=HASH

Source
width

@[JSON::Field(key: "width", converter: Int32)] Width of the image in pixels

Source