Skip to content

Atom Namespace Reference

The Atom namespace allows RSS and RDF feeds to include Atom-specific elements, providing richer metadata and linking capabilities. This namespace provides partial Atom elements that can be embedded within other feed formats.

Namespace URIhttp://www.w3.org/2005/Atom
SpecificationRFC 4287 - Atom Syndication Format
Prefix<atom:*>
Available inRSS, RDF
Propertyatom

Types

INFO

TDate represents date fields in the type definitions. When parsing, dates are returned as strings in their original format (see Parsing › Handling Dates for more details). When generating, dates should be provided as JavaScript Date objects.

ts
export namespace Atom {
  // For simplicity's sake, a string is used for now, but this may be reconsidered in the future.
  export type Text = string

  export type Link<TDate extends DateLike> = {
    href: string
    rel?: string
    type?: string
    hreflang?: string
    title?: string
    length?: number
    thr?: ThrNs.Link<TDate>
  }

  export type Person = {
    name: string
    uri?: string
    email?: string
    arxiv?: ArxivNs.Author
  }

  export type Category = {
    term: string
    scheme?: string
    label?: string
  }

  export type Generator = {
    text: string
    uri?: string
    version?: string
  }

  export type Source<TDate extends DateLike> = {
    authors?: Array<Person>
    categories?: Array<Category>
    contributors?: Array<Person>
    generator?: Generator
    icon?: string
    id?: string
    links?: Array<Link<TDate>>
    logo?: string
    rights?: Text
    subtitle?: Text
    title?: Text
    updated?: TDate
  }

  export type Entry<TDate extends DateLike> = {
    authors?: Array<Person>
    categories?: Array<Category>
    content?: Text
    contributors?: Array<Person>
    id: string
    links?: Array<Link<TDate>>
    published?: TDate
    rights?: Text
    source?: Source<TDate>
    summary?: Text
    title: Text
    updated: TDate
    app?: AppNs.Entry<TDate>
    arxiv?: ArxivNs.Entry
    cc?: CcNs.ItemOrFeed
    dc?: DcNs.ItemOrFeed<TDate>
    slash?: SlashNs.Item
    itunes?: ItunesNs.Item
    googleplay?: GooglePlayNs.Item
    psc?: PscNs.Item
    media?: MediaNs.ItemOrFeed
    georss?: GeoRssNs.ItemOrFeed
    geo?: GeoNs.ItemOrFeed
    thr?: ThrNs.Item
    dcterms?: DcTermsNs.ItemOrFeed<TDate>
    creativeCommons?: CreativeCommonsNs.ItemOrFeed
    wfw?: WfwNs.Item
    yt?: YtNs.Item
    pingback?: PingbackNs.Item
    trackback?: TrackbackNs.Item
  }

  export type Feed<TDate extends DateLike> = {
    authors?: Array<Person>
    categories?: Array<Category>
    contributors?: Array<Person>
    generator?: Generator
    icon?: string
    id: string
    links?: Array<Link<TDate>>
    logo?: string
    rights?: Text
    subtitle?: Text
    title: Text
    updated: TDate
    entries?: Array<Entry<TDate>>
    cc?: CcNs.ItemOrFeed
    dc?: DcNs.ItemOrFeed<TDate>
    sy?: SyNs.Feed<TDate>
    itunes?: ItunesNs.Feed
    googleplay?: GooglePlayNs.Feed
    media?: MediaNs.ItemOrFeed
    georss?: GeoRssNs.ItemOrFeed
    geo?: GeoNs.ItemOrFeed
    dcterms?: DcTermsNs.ItemOrFeed<TDate>
    creativeCommons?: CreativeCommonsNs.ItemOrFeed
    opensearch?: OpenSearchNs.Feed
    yt?: YtNs.Feed
    admin?: AdminNs.Feed
    pingback?: PingbackNs.Feed
  }
}