ServerUiSettings

com.worxbend.codeberg4s.miscellaneous.ServerUiSettings
final case class ServerUiSettings

What GET /settings/ui says about the instance's web interface.

The fourth and last of the /settings family, beside ServerApiSettings, ServerRepositorySettings and ServerAttachmentSettings. It is the one with no effect on what the API will accept: nothing here changes whether a request succeeds. What it is for is agreeing with the web UI — a client that offers a reaction the instance does not allow gets a 422 from the reaction endpoints, and reading allowedReactions first is how that is avoided.

'''Derived from spec/swagger.v1.json's GeneralUISettings definition, not from a captured response.''' The three other settings endpoints have golden fixtures; this one was not harvested.

Value parameters

allowedReactions

the emoji the instance accepts on com.worxbend.codeberg4s.issues.Reaction endpoints, as bare names such as +1 and heart. Empty when the instance reported none, which is not the same as "reactions are off" — it means the instance did not say

customEmojis

the names of emoji this deployment defines beyond the standard set, which a renderer has to resolve against the instance rather than against a Unicode table

defaultTheme

the theme a signed-out visitor sees, absent when the instance did not report one

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def allows(reaction: String): Boolean

Whether reaction is one the instance accepts.

Whether reaction is one the instance accepts.

Answers false when allowedReactions is empty, because an empty list is "the instance did not say" and this library does not turn silence into permission.

Attributes

Inherited methods

def productElementNames: Iterator[String]

An iterator over the names of all the elements of this product.

An iterator over the names of all the elements of this product.

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

An iterator over all the elements of this product.

An iterator over all the elements of this product.

Attributes

Returns

in the default implementation, an Iterator[Any]

Inherited from:
Product