-
Notifications
You must be signed in to change notification settings - Fork 19
Data Models
Before we get into the basic API usage, let's talk about the data models in KtRssReader. KtRssReader provides 4 model classes and custom annotations for you to get different kinds of tags you need.
RssStandardChannelData
/ RssStandardChannel
: To get tags and values from RSS 2.0 standard.
ITunesChannelData
/ ITunesChannel
: To get iTunes tags from a source.
GoogleChannelData
/ GoogleChannel
: To get Google Play tags.
AutoMixChannelData
/ AutoMixChannel
: It automatically merges tags by the following order: RSS 2.0 -> iTunes -> Google Play
.
The first tags it will look into are RSS 2.0 standard tags, if RSS 2.0 doesn't have usable values, the parser will look for iTunes tags as an alternative source. Then, if even iTunes tags don't have usable values, the parser will eventually look for Google Play tags as the second alternative source. For example, we got <image>
tag in the RSS source. We would like to find usable values of the image. So the parser will look for values by the order of <image>
, <itunes:image>
, and <googleplay:image>
. For merging tags, AutoMixChannelData
will automatically merge data by their tag names without the platform prefixes. View the tag mapping table here.
In short, AutoMixChannelData
and AutoMixChannel
can provide you the union set of all tags and values from all formats.