The gpodder API as data: the request map of each call, and what the answer to it says, for any HTTP client to send and receive.
The paths are those of gpodder.net, which oPodSync and other servers speak too, and those of the GPodder Sync app for Nextcloud, or a map of paths of a server's own.
The gpodder API as data: the request map of each call, and what the answer to it says, for any HTTP client to send and receive. The paths are those of gpodder.net, which oPodSync and other servers speak too, and those of the GPodder Sync app for Nextcloud, or a map of paths of a server's own.
The paths of the calls, by the API that a server speaks.
In a path, {user} is the user name, and {device} is the id of the device. The API :gpodder is that of gpodder.net, which oPodSync and other servers speak too, and :nextcloud is that of the GPodder Sync app for Nextcloud. That app has no login and keeps no devices, so it has no path for :login or :register. The :api of the options is a name here, or a map of paths of this shape for a server with paths of its own.
The paths of the calls, by the API that a server speaks.
In a path, {user} is the user name, and {device} is the id of the
device. The API :gpodder is that of gpodder.net, which oPodSync and
other servers speak too, and :nextcloud is that of the GPodder Sync app
for Nextcloud. That app has no login and keeps no devices, so it has no
path for :login or :register. The :api of the options is a name here,
or a map of paths of this shape for a server with paths of its own.The calls that a backend makes to a server.
The calls that a backend makes to a server.
(request
call
root
{:keys [api credentials device since body] :or {api :gpodder} :as opts})The request map for call, one of calls, to the server at root, with
the opts below:
Every call has the credentials as Basic authentication, and the session when there is one, since some servers want the one and others the other. The password and the session can be hidden texts of dk.simongray.wary-fetch.secret, and the request has them in its headers as hidden texts.
The request map for `call`, one of calls, to the server at `root`, with the `opts` below: - :api, :gpodder by default, :nextcloud, or a map of paths as in apis - :credentials, a :username and a :password, or a function that returns them - :device, the device's id on the server - :since, the seconds since the epoch, for :subscriptions and :episodes - :body, the data to send as JSON - :session, the session of a :login Every call has the credentials as Basic authentication, and the session when there is one, since some servers want the one and others the other. The password and the session can be hidden texts of dk.simongray.wary-fetch.secret, and the request has them in its headers as hidden texts.
(response call {:keys [status headers body] :as answer})What the answer to call, a map of :status, :headers and :body, says:
An action has keyword keys, the action in lower case and the time as an instant. A rewritten URL is nil when the server refused the URL that was sent. It throws ::failed with the :status when the status isn't a success, or when the answer isn't the JSON object that the call expects.
What the `answer` to `call`, a map of :status, :headers and :body, says: - :login, the session id that the server set, or nil - :register, nil - :subscriptions, the URLs to :add and to :remove, and the :timestamp - :episodes, the :actions and the :timestamp - :update-subscriptions and :update-episodes, the :timestamp, and the :update-urls as pairs of the URL sent and the URL rewritten An action has keyword keys, the action in lower case and the time as an instant. A rewritten URL is nil when the server refused the URL that was sent. It throws ::failed with the :status when the status isn't a success, or when the answer isn't the JSON object that the call expects.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |