class Kagi::Object::Image

Overview

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

Included Modules

Defined in:

kagi/objects.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(pull : JSON::PullParser) #

[View source]

Instance Method Detail

def height : String #

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


[View source]
def proxy_url : String #

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


[View source]
def url : String #

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


[View source]
def width : String #

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


[View source]