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

Client API to interact with settings on Urbit. Urbit settings-store is a simple key-value store with a simple API. There's "buckets" and "entries". Entries have a value which can be an integer, a string or a list. Landscape has its own set of settings (background images, whether to show nicknames or render avatars, etc.) But you can store anything you want in there. This module provides functions to modify Landscape settings as well as insert or delete your own. This module also includes functions to interact with s3-store, the module to set up S3 buckets. s3-store precedede settings-store but it might be merged into it in the future.

Link to this section Summary

Functions

Adds your own category of setting to your Urbit settings-store. Takes an UrbitEx.Session struct and a name string for the "bucket". Can be anything.

Add your own setting to your Urbit settings-store under a given bucket. Takes an UrbitEx.Session struct, an entry string and a value. Values can be integers, strings or lists (of integers or strings). The setting stays there so you can read it later at your convenience and use it however you want.

Add a bucket from your S3 server. Takes an UrbitEx.Session struct and an string for the bucket name.

Fetches all settings in your ship's settings-store. Takes an UrbitEx.Session struct.

Fetches the value of a given bucket in your settings-store. Takes an UrbitEx.Session struct and a bucket string.

Fetches the value of a given entry of a given bucket in your settings-store. Takes an UrbitEx.Session struct, a bucket string and an entry string.

Fetches the current configuration of the S3 server. Takes an UrbitEx.Session struct.

Fetches the current credentials of the S3 server. Takes an UrbitEx.Session struct.

Queries your settings-store to see if a given bucket exists. Returns a boolean. Takes an UrbitEx.Session struct and a bucket string.

Queries your settings-store to see if a given entry of a given bucket exists. Returns a boolean. Takes an UrbitEx.Session struct, a bucket string and an entry string.

Set to hide or not hide avatars on Landscape. Takes an UrbitEx. Session struct and a boolean.

Set to hide or not hide the group tiles on Landscape. If you really really like the weather and clock tiles. Takes an UrbitEx. Session struct and a boolean.

Set to hide or not hide nicknames on Landscape. Takes an UrbitEx. Session struct and a boolean.

Set to hide or not hide the counts of unread messages per group on Landscape. Takes an UrbitEx. Session struct and a boolean.

Set to hide or not hide the utlity tiles (Weather, Clock, etc.) on Landscape. Takes an UrbitEx. Session struct and a boolean.

Set whether to render a media player for audio on Landscape. Takes an UrbitEx. Session struct and a boolean.

Set whether to render a media player for video on Landscape. Takes an UrbitEx. Session struct and a boolean.

Removes custo background. Takes an UrbitEx.Session struct.

Delete settings bucket. Takes an UrbitEx.Session struct, and a string for the bucket name you want to delete.

Delete settings entry. Takes an UrbitEx.Session struct, a string for the bucket, and a string for the entry you want to delete.

Remove an S3 bucket. Takes an UrbitEx.Session struct and an string for the bucket name.

Set whether to render embedded content (Twitter links and other OEmbed content) on Landscape. Takes an UrbitEx. Session struct and a boolean.

Set to toggle whether to render images automatically on Landscape. If set to false only urls will render. This and the following settings are useful in order to avoid your browser IP address to leak to the server of the remote content. Takes an UrbitEx. Session struct and a boolean.

Sets the Landscape background color. Takes an UrbitEx.Session struct and a color string. Color can be any css color string, Landscape appears to read it as is.

Sets the Landscape background image. Takes an UrbitEx.Session struct and a url string.

Set the default bucket to use for Urbit. Takes an UrbitEx.Session struct and an string for the bucket name.

Set the access key (the login) of your S3 server. Takes an UrbitEx.Session struct and an string for the access key.

Set the URL hosting your S3 server. Takes an UrbitEx.Session struct and an string for the endpoint.

Set the secret key (the password) of your S3 server. Takes an UrbitEx.Session struct and an string for the password.

Sets the Landscape theme. Takes an UrbitEx.Session struct and a theme string. Default theme is light, unless "dark" is specified.

Link to this section Functions

Link to this function

add_custom_bucket(session, channel, bucket)

View Source

Adds your own category of setting to your Urbit settings-store. Takes an UrbitEx.Session struct and a name string for the "bucket". Can be anything.

Link to this function

add_custom_entry(session, channel, bucket, entry, value)

View Source

Add your own setting to your Urbit settings-store under a given bucket. Takes an UrbitEx.Session struct, an entry string and a value. Values can be integers, strings or lists (of integers or strings). The setting stays there so you can read it later at your convenience and use it however you want.

Link to this function

add_s3_bucket(session, channel, name)

View Source

Add a bucket from your S3 server. Takes an UrbitEx.Session struct and an string for the bucket name.

Fetches all settings in your ship's settings-store. Takes an UrbitEx.Session struct.

Link to this function

fetch_bucket(session, bucket)

View Source

Fetches the value of a given bucket in your settings-store. Takes an UrbitEx.Session struct and a bucket string.

Link to this function

fetch_entry(session, bucket, entry)

View Source

Fetches the value of a given entry of a given bucket in your settings-store. Takes an UrbitEx.Session struct, a bucket string and an entry string.

Link to this function

fetch_s3_configuration(session)

View Source

Fetches the current configuration of the S3 server. Takes an UrbitEx.Session struct.

Link to this function

fetch_s3_credentials(session)

View Source

Fetches the current credentials of the S3 server. Takes an UrbitEx.Session struct.

Link to this function

has_bucket?(session, bucket)

View Source

Queries your settings-store to see if a given bucket exists. Returns a boolean. Takes an UrbitEx.Session struct and a bucket string.

Link to this function

has_entry?(session, bucket, entry)

View Source

Queries your settings-store to see if a given entry of a given bucket exists. Returns a boolean. Takes an UrbitEx.Session struct, a bucket string and an entry string.

Link to this function

hide_avatars(session, channel, boolean)

View Source

Set to hide or not hide avatars on Landscape. Takes an UrbitEx. Session struct and a boolean.

Link to this function

hide_groups(session, channel, boolean)

View Source

Set to hide or not hide the group tiles on Landscape. If you really really like the weather and clock tiles. Takes an UrbitEx. Session struct and a boolean.

Link to this function

hide_nicknames(session, channel, boolean)

View Source

Set to hide or not hide nicknames on Landscape. Takes an UrbitEx. Session struct and a boolean.

Link to this function

hide_unreads(session, channel, boolean)

View Source

Set to hide or not hide the counts of unread messages per group on Landscape. Takes an UrbitEx. Session struct and a boolean.

Link to this function

hide_utilities(session, channel, boolean)

View Source

Set to hide or not hide the utlity tiles (Weather, Clock, etc.) on Landscape. Takes an UrbitEx. Session struct and a boolean.

Link to this function

play_audio(session, channel, boolean)

View Source

Set whether to render a media player for audio on Landscape. Takes an UrbitEx. Session struct and a boolean.

Link to this function

play_video(session, channel, boolean)

View Source

Set whether to render a media player for video on Landscape. Takes an UrbitEx. Session struct and a boolean.

Link to this function

remove_background(session, channel)

View Source

Removes custo background. Takes an UrbitEx.Session struct.

Link to this function

remove_bucket(session, channel, bucket)

View Source

Delete settings bucket. Takes an UrbitEx.Session struct, and a string for the bucket name you want to delete.

Link to this function

remove_entry(session, channel, bucket, entry)

View Source

Delete settings entry. Takes an UrbitEx.Session struct, a string for the bucket, and a string for the entry you want to delete.

Link to this function

remove_s3_bucket(session, channel, name)

View Source

Remove an S3 bucket. Takes an UrbitEx.Session struct and an string for the bucket name.

Link to this function

render_embeds(session, channel, boolean)

View Source

Set whether to render embedded content (Twitter links and other OEmbed content) on Landscape. Takes an UrbitEx. Session struct and a boolean.

Link to this function

render_images(session, channel, boolean)

View Source

Set to toggle whether to render images automatically on Landscape. If set to false only urls will render. This and the following settings are useful in order to avoid your browser IP address to leak to the server of the remote content. Takes an UrbitEx. Session struct and a boolean.

Link to this function

set_background_color(session, channel, color)

View Source

Sets the Landscape background color. Takes an UrbitEx.Session struct and a color string. Color can be any css color string, Landscape appears to read it as is.

Link to this function

set_background_image(session, channel, url)

View Source

Sets the Landscape background image. Takes an UrbitEx.Session struct and a url string.

Link to this function

set_default_s3_bucket(session, channel, name)

View Source

Set the default bucket to use for Urbit. Takes an UrbitEx.Session struct and an string for the bucket name.

Link to this function

set_s3_access_key(session, channel, login)

View Source

Set the access key (the login) of your S3 server. Takes an UrbitEx.Session struct and an string for the access key.

Link to this function

set_s3_endpoint(session, channel, endpoint)

View Source

Set the URL hosting your S3 server. Takes an UrbitEx.Session struct and an string for the endpoint.

Link to this function

set_s3_secret(session, channel, password)

View Source

Set the secret key (the password) of your S3 server. Takes an UrbitEx.Session struct and an string for the password.

Link to this function

theme(session, channel, theme)

View Source

Sets the Landscape theme. Takes an UrbitEx.Session struct and a theme string. Default theme is light, unless "dark" is specified.