Skip to content

Data Models

Ivan edited this page Feb 17, 2021 · 5 revisions

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.

RSS 2.0 Standard Format

RssStandardChannelData / RssStandardChannel: To get tags and values from RSS 2.0 standard.

iTunes Podcast Format

ITunesChannelData / ITunesChannel: To get iTunes tags from a source.

Google Play Podcast Format

GoogleChannelData / GoogleChannel: To get Google Play tags.

Auto Mix Data

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.