rss-parser icon indicating copy to clipboard operation
rss-parser copied to clipboard

Add returning resolved feed type

Open Yagich93 opened this issue 6 years ago • 2 comments

Hello!

Thanks for your work!

I would like to propose a feature. It seems like there is no info on the resolved feed type (spec) returned in the resulting feed object (whether the feed is RSS1.0, or RSS2.0, or Atom, etc.). The type is determined anyway during parsing.

I'd propose adding some field like type or spec with one of values such as rss1, rss2, atom, etc. Returned object example:

{
    // New field
    "type": "rss2", // or "rss1", or "atom", etc.

    // Existing fields
    "feedUrl": "http://somefeed.com/feed",
    "title": "Some Feed",
    "items": [
        // ...Feed items...
    ],
    // ...Other feed properties...
}

I would find getting this kind of metadata helpful. I may try creating a pull-request for this, if you'd like.

Thanks!

Best regards, Iakov.

Yagich93 avatar Nov 15 '19 11:11 Yagich93

Great idea! Would definitely accept a PR here. Thanks!

rbren avatar Nov 19 '19 18:11 rbren

{
    "items": [
        {
            "title": "*******"
            "link": "********"
            "itunes": {
                "episodeType": "full Or trailer or bonus"
                
            }
        }
    ]

}

alibeheshtian avatar Feb 04 '20 13:02 alibeheshtian