-
Notifications
You must be signed in to change notification settings - Fork 0
/
Image.kt
61 lines (53 loc) · 1.84 KB
/
Image.kt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
package dev.patbeagan.protocolrss.core
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty
/**
* `<image>` is an optional sub-element of `<channel>,`
* which contains three required and three optional sub-elements.
*
* Optional elements include `<width>` and `<height>`, numbers,
* indicating the width and height of the image in pixels.
*
* `<description>` contains text that is included in the TITLE attribute of the link formed around the image in the HTML rendering.
*/
data class Image(
/**
* `<link>` is the URL of the site, when the channel is rendered, the image is a link to the site.
*
* (Note, in practice the image `<title>` and `<link>` should have the same value as the channel's `<title>` and `<link>.`
*/
@JvmField
@field:JacksonXmlProperty
var link: String,
/**
* `<title>` describes the image, it's used in the ALT attribute of the HTML `<img>` tag when the channel is rendered in HTML.
*/
@JvmField
@field:JacksonXmlProperty
var title: String,
/**
* `<url>` is the URL of a GIF, JPEG or PNG image that represents the channel.
*/
@JvmField
@field:JacksonXmlProperty
var url: String,
/**
* `<description>` contains text that is included in the TITLE attribute of the link formed around the image in the HTML rendering.
*/
@JvmField
@field:JacksonXmlProperty
var description: String? = null,
/**
* `<width>` indicates the width of the image in pixels.
* Maximum value for width is 144, default value is 88.
*/
@JvmField
@field:JacksonXmlProperty
var width: Int? = null,
/**
* `<height>` indicates the height of the image in pixels.
* Maximum value for height is 400, default value is 31.
*/
@JvmField
@field:JacksonXmlProperty
var height: Int? = null,
)