UrbitEx.API.Notifications (UrbitEx v0.6.3) View Source

Client API to interact with hark-store, the notifications system of Urbit.

Link to this section Summary

Functions

Set Do Not Disturb option. When true, you won't receive notifications. Takes an UrbitEx.Session struct and a boolean.

Fetches all notifications stored on your ship. Takes an UrbitEx.Session struct, a type atom (or string), which can be :archive or :inbox (for old and current notifications), an offset integer and a count integer. Returns a Timebox struct.

Ignore a channel. When ignored, your ship won't track unread nodes from that channel. Takes an UrbitEx.Session struct and an UrbitEx.Resource struct for the channel.

Mark all nodes in a channel as read. Takes an UrbitEx.Session struct, an UrbitEx.Resource struct for the group and another one for the channel.

Mark a nodes and their children in a channel as read. This is used for notes and links, to set them and their children as read, together. Takes an UrbitEx.Session struct, an UrbitEx.Resource struct for the group and another one for the channel. It also takes an index string of the target node and the type of channel it belongs, whether :publish or :link.

Mark a nodes and their children in a channel as read. This is used for notes and links, to set them and their children as read, together. Takes an UrbitEx.Session struct, an UrbitEx.Resource struct for the group and another one for the channel. It also takes an index string of the target node and the type of channel it belongs, whether :publish or :link.

Unmute a channel. When unmuted, your ship will track unread nodes from that channel. Takes an UrbitEx.Session struct and an UrbitEx.Resource struct for the channel.

Set whether you want notifications when you are mentioned in a channel you are subscribed to. When false, you won't receive notifications. Takes an UrbitEx.Session struct and a boolean.

Set whether you want notifications when a node you authored has received replies, e.g. a channel you host or a notebook post you wrote. When false, you won't receive notifications. Takes an UrbitEx.Session struct and a boolean.

Link to this section Functions

Link to this function

do_not_disturb(session, channel, boolean)

View Source

Set Do Not Disturb option. When true, you won't receive notifications. Takes an UrbitEx.Session struct and a boolean.

Link to this function

fetch(session, type \\ :inbox, offset \\ 0, count \\ 10)

View Source

Fetches all notifications stored on your ship. Takes an UrbitEx.Session struct, a type atom (or string), which can be :archive or :inbox (for old and current notifications), an offset integer and a count integer. Returns a Timebox struct.

Link to this function

mute_channel(session, channel, resource)

View Source

Ignore a channel. When ignored, your ship won't track unread nodes from that channel. Takes an UrbitEx.Session struct and an UrbitEx.Resource struct for the channel.

Link to this function

read_channel(session, channel, group, resource)

View Source

Mark all nodes in a channel as read. Takes an UrbitEx.Session struct, an UrbitEx.Resource struct for the group and another one for the channel.

Link to this function

read_node(session, channel, group, resource, node_index, channel_type)

View Source

Mark a nodes and their children in a channel as read. This is used for notes and links, to set them and their children as read, together. Takes an UrbitEx.Session struct, an UrbitEx.Resource struct for the group and another one for the channel. It also takes an index string of the target node and the type of channel it belongs, whether :publish or :link.

Link to this function

read_whole_node(session, channel, group, resource, node_index, channel_type)

View Source

Mark a nodes and their children in a channel as read. This is used for notes and links, to set them and their children as read, together. Takes an UrbitEx.Session struct, an UrbitEx.Resource struct for the group and another one for the channel. It also takes an index string of the target node and the type of channel it belongs, whether :publish or :link.

Link to this function

unmute_channel(session, channel, resource)

View Source

Unmute a channel. When unmuted, your ship will track unread nodes from that channel. Takes an UrbitEx.Session struct and an UrbitEx.Resource struct for the channel.

Link to this function

watch_mentions(session, channel, boolean)

View Source

Set whether you want notifications when you are mentioned in a channel you are subscribed to. When false, you won't receive notifications. Takes an UrbitEx.Session struct and a boolean.

Link to this function

watch_replies(session, channel, boolean)

View Source

Set whether you want notifications when a node you authored has received replies, e.g. a channel you host or a notebook post you wrote. When false, you won't receive notifications. Takes an UrbitEx.Session struct and a boolean.