Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] iTunes RSS extensions support #108

Closed
1 task done
kazhuravlev opened this issue Jan 14, 2024 · 1 comment
Closed
1 task done

[FEATURE] iTunes RSS extensions support #108

kazhuravlev opened this issue Jan 14, 2024 · 1 comment

Comments

@kazhuravlev
Copy link

kazhuravlev commented Jan 14, 2024

Is there an existing feature request for this?

  • I have searched the existing feature requests

Is your feature request related to a problem? Please describe.

I would like to generate a RSS feed for iTunes Podcast. This service have a special xml tags. Some of them required, but other - just recommended.

Describe the solution that you would like.

Apple allow to extend some of existing well-known XML tags like channel and item. Itunes tags have a special namespace (prefix for each iTunes tag) like <irunes:....>. So in my opinion we can add some optional field to Channel and Item structs and allow to fill them by user.

It can be looks like this:

feed := &feeds.Feed{
    Title:       "jmoiron.net blog",
    Link:        &feeds.Link{Href: "http://jmoiron.net/blog"},
    Description: "discussion about tech, footie, photos",
    Author:      &feeds.Author{Name: "Jason Moiron", Email: "jmoiron@jmoiron.net"},
    Created:     now,
    ITunes:      &ItunesFeed{
        Author:     "Author name",
        Type:       "full",
        Image:      "image.png",
        Explicit:   true,
        Categories: []ITunesCategory{...},
    },
    Items: []*feeds.Item{
        &feeds.Item{
            Title:       "Limiting Concurrency in Go",
            Link:        &feeds.Link{Href: "http://jmoiron.net/blog/limiting-concurrency-in-go/"},
            Description: "A discussion on controlled parallelism in golang",
            Author:      &feeds.Author{Name: "Jason Moiron", Email: "jmoiron@jmoiron.net"},
            Created:     now,
            ITunes:      &ItunesItem{
                {
                    Title: "asdasd",
                    ....
                },
            },
        },
    },
}

This design will allow us to add other RSS extensions from other providers like Spotify, which have their own XML tags.

Links:

Describe alternatives you have considered.

Ability to add a user-defined data in each XML tag like this (it is like a raw access to the rss):

type CustomItem interface {
    // THis methods will allow user to choose - when this custom field will be presented
    MarshalAtom()([]byte,error)
    MarshalRSS()([]byte,error)
    MarshalJSON()([]byte,error)
}


feed := &feeds.Feed{
    Title:       "jmoiron.net blog",
    // ...
}
feed.Add(CustomItemImpl{...})

feed.Items[0].Add(CustomItemImpl{...})

Anything else?

@jj-style jj-style mentioned this issue Apr 8, 2024
12 tasks
@jaitaiwan
Copy link
Member

Closed as per comment on #110. New set of maintainers so new position. Thanks folks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants