figbus/elm-urbit-api/4.0.0

NOTE: the latest version is 4.0.1

Urbit.Metadata

type alias MetadataResource =
{ appName : String
, resource : Resource
}

A metadata resource

type Config
= Group { feed : Maybe MetadataResource }
| Graph { module_ : String }

Metadata config

type Vip
= ReaderComments
| MemberMetadata
| HostFeed
| AdminFeed
| NoVariation

Variation in Permissions

  • ReaderComments: Allow readers to comment, regardless of whether they can write. (notebook, collections)
  • MemberMetadata: Allow members to add channels (groups)
  • HostFeed: Only host can post to group feed
  • AdminFeed: Only admins and host can post to group feed
  • NoVariation: No variation
add :
{ session : Session
, group : Resource
, resource : MetadataResource
, metadata :
{ title : String
, description : String
, color : String
, dateCreated : Posix
, creator : Atom
, config : Config
, picture : String
, preview : Bool
, hidden : Bool
, vip : Vip
}
}
-> OutMsg

Add metadata.

  • appName is usually set to "groups" for modifying group metadata, and "graph" for modifying metadata of an individual graph
  • color is a hex color code without the "#" (i.e. "4d0a3b")
{ session : Session
, group : Resource
, resource : MetadataResource
}
-> OutMsg

Remove metadata.