Expand description
Changing the tree of folders and feeds, and a reader’s settings.
A level of the tree (the top, or the inside of a folder) holds folders and feeds in one order. Whenever a level changes, its nodes are numbered anew from 1, so positions never run out of room between two neighbors. Changes to one account’s tree happen one after the other: each locks the account.
The rules of the tree itself (no folder inside itself, at most five levels) are the database’s; see the trigger in the first migration.
Structs§
- Created 🔒
- The answer to making something: the number it got.
- Feed
Info - What the server knows of a feed and how it is fetched, for a reader to pass on to whoever helps with it. Nothing in it is about other accounts.
- Move 🔒
- Where a node goes, seen from the node it is dropped on, as in the interface’s own model of the tree.
- NewAgent 🔒
- What
PUT /api/feeds/{id}/agentreads. - NewFolder 🔒
- What
POST /api/foldersreads. It answers withCreated. - Rename 🔒
- What
PATCH /api/folders/{id}andPATCH /api/feeds/{id}read. A subscription without a title of its own goes by its feed’s.
Enums§
- Drop 🔒
- The side of the node it is dropped on that a node lands on: before it, after it or, for a folder, inside it.
- Fetch
Agent 🔒 - Who a feed is fetched as: as rueder, or as a browser, for sites that turn readers like rueder away.
- Node
- A folder or a subscription, as the tree’s changes name them.
Constants§
- MAX_
FEEDS - How many feeds an account can subscribe to. Every one of them is fetched for as long as somebody reads it.
- MAX_
FEEDS_ IN_ FOLDER - How many feeds one folder, or the top level, can hold.
- MAX_
FOLDERS - How many folders an account can have.
- MAX_
SETTINGS - The largest settings of an account, in bytes of JSON.
- MAX_
TITLE - The longest name of a folder or a subscription, in characters.
Functions§
- add_
folder 🔒 - A new, empty folder at the end of its level.
- bad 🔒
- end_of 🔒
- The position after the last node of a level.
- feed_
info - What the server knows of a feed: with
reader, only if that account reads it; without, of any feed, for the operator. - info 🔒
- What the server knows of a feed the account reads and how it is fetched: its number, its addresses, as what and when it was fetched and why that failed, for a message to support.
- level 🔒
- The nodes of one level in their order. Where positions are equal, folders come first, then the older node.
- move_
node 🔒 - Moves a folder or a feed: before or after another node, or into a folder at its end. A folder does not go into itself, and folders nest at most five levels deep.
- parent_
of 🔒 - Where a node is:
Noneif the account has no such node, else its folder. - remove_
folder 🔒 - Takes a folder out. What was in it moves to where the folder was.
- rename_
feed 🔒 - Gives a subscription a name of the reader’s own, or, without one, the feed’s name back.
- rename_
folder 🔒 - Gives a folder another title.
- renumber 🔒
- Numbers the nodes of a level from 1, in this order.
- room_
for_ 🔒feed - Whether a folder, or the top level, can take one more feed.
- room_
for_ 🔒subscription - Whether the account can subscribe to one more feed.
- routes
- rule 🔒
- What the database says when a change breaks a rule of the tree becomes an answer the reader can do something with.
- set_
agent 🔒 - Says as what a feed is fetched: as rueder, or as a browser for sites that turn rueder away. The feed is one for all who read it, so this holds for all of them, and rueder passes for a browser in the name of the whole server: only an admin who reads it says it. The next fetch comes at once.
- set_
settings 🔒 - Replaces the settings. What is in them is the interface’s business; the server only keeps them, within a size.
- settings 🔒
- The reader’s settings, as the interface last stored them: the same on every device.
- title 🔒
- A name as it is stored, or why it cannot be one.
- types 🔒
- The types this module sends and reads, for the frontend.
- unsubscribe 🔒
- Ends a subscription, and with it what the reader read, starred and labelled there. The feed and its articles stay for whoever else reads it.