Liking cljdoc? Tell your friends :D
All platforms.

dk.simongray.podcast

Fetching a podcast feed or an OPML list as data, in one call.

Fetching a podcast feed or an OPML list as data, in one call.
raw docstring

fetch!clj/s

(fetch! url)
(fetch! url opts)

Fetch the feed at url and parse it with the opts below. In ClojureScript, it gives a promise:

{:status 200 :url "…"             ; the final URL, after redirects
 :permanent-url "…"               ; when redirects moved it for good
 :etag "…" :last-modified "…"    ; to send next time
 :not-before #inst "…"            ; when the server asks you to wait
 :body "…" :feed {…} :report [...] ; on a 200
 :new-feed-url "…"                ; when the feed declares a move
 :websub {:hubs ["…"] :topic "…"}  ; when the feed names a WebSub hub
 :error {…}}                      ; when the fetch failed

The opts are those of http/fetch! and rss/parse, and:

  • :credentials, for a private feed, or else those in the url
  • :max-pages, the most pages of a paged feed to fetch and join
  • :max-wait-seconds, the latest :not-before, an hour by default, since a feed can change within the freshness that its server names

Nothing is thrown for what the network, the server or the body does, and any status besides 200 comes back as :status. A status other than 200 and 304 also has a :fetch/status :error, e.g. a 404.

Fetch the feed at `url` and parse it with the `opts` below. In
ClojureScript, it gives a promise:

    {:status 200 :url "…"             ; the final URL, after redirects
     :permanent-url "…"               ; when redirects moved it for good
     :etag "…" :last-modified "…"    ; to send next time
     :not-before #inst "…"            ; when the server asks you to wait
     :body "…" :feed {…} :report [...] ; on a 200
     :new-feed-url "…"                ; when the feed declares a move
     :websub {:hubs ["…"] :topic "…"}  ; when the feed names a WebSub hub
     :error {…}}                      ; when the fetch failed

The `opts` are those of http/fetch! and rss/parse, and:

- :credentials, for a private feed, or else those in the `url`
- :max-pages, the most pages of a paged feed to fetch and join
- :max-wait-seconds, the latest :not-before, an hour by default, since a
  feed can change within the freshness that its server names

Nothing is thrown for what the network, the server or the body does,
and any status besides 200 comes back as :status. A status other than
200 and 304 also has a :fetch/status :error, e.g. a 404.
sourceraw docstring

fetch-list!clj/s

(fetch-list! url)
(fetch-list! url opts)

Fetch the OPML list at url with the opts of http/fetch!, and parse it. The :credentials are those in the url by default. In ClojureScript, it gives a promise:

{:status 200 :url "…"             ; the final URL, after redirects
 :permanent-url "…"               ; when redirects moved it for good
 :etag "…" :last-modified "…"    ; to send next time
 :not-before #inst "…"            ; when the server asks you to wait
 :list {…}                         ; on a 200
 :error {…}}                       ; when the fetch failed

Nothing is thrown for what the network, the server or the body does, and any status besides 200 comes back as :status. A status other than 200 and 304 also has a :fetch/status :error, e.g. a 404.

Fetch the OPML list at `url` with the `opts` of http/fetch!, and parse
it. The :credentials are those in the `url` by default. In
ClojureScript, it gives a promise:

    {:status 200 :url "…"             ; the final URL, after redirects
     :permanent-url "…"               ; when redirects moved it for good
     :etag "…" :last-modified "…"    ; to send next time
     :not-before #inst "…"            ; when the server asks you to wait
     :list {…}                         ; on a 200
     :error {…}}                       ; when the fetch failed

Nothing is thrown for what the network, the server or the body does,
and any status besides 200 comes back as :status. A status other than
200 and 304 also has a :fetch/status :error, e.g. a 404.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close