UrbitEx.API.Groups (UrbitEx v0.5.7) View Source

Client API to interact with groups on Urbit .

Link to this section Summary

Functions

Ban ranks from a group. Takes an UrbitEx.Session struct and an UrbitEx.Resource struct, and a list of ranks to ban. Triggers one groupUpdate event. Eyre will return a 204 even if done on a private group (where bans are nonsensical).

Ban ships from a group. Takes an UrbitEx.Session struct and an UrbitEx.Resource struct, and a list of ships to ban. Triggers one groupUpdate event. Eyre will return a 204 even if done on a private group (where bans are nonsensical).

Creates an Urbit group. Takes an UrbitEx.Session struct, a name string, a description string, a type string (either "open" or "invite", i.e open or private), an optional list of options. Options are banned ranks ("czar", "duke", "earl", "king", and/or "pawn"), banned ships, or invitees, for "invite" groups. TODO: options don't appear to work on group creation Landscape forces the name to be equal to the title (but ascii lower case, no spaces) but it can be different. If successful it triggers 1 metadata-update and 2 groupUpdate events. Eyre returns a 200 response.

Deletes group. Takes an UrbitEx.Session struct and an UrbitEx.Resource struct. Triggers one groupUpdate event and one metadata-update event. Eyre returns a 200 response.

Invite ship to an Urbit Group. Takes an UrbitEx.Session struct and an UrbitEx.Resource struct, a list of invitees and an invite message. Triggers two group-update events. Invitees will get an invite-update event.

Joins a public urbit group. Takes an UrbitEx.Session struct and an UrbitEx.Resource struct. Joining a group, if successful, triggers 4 group-view-update, 1 groupUpdate and 1 metadata-update SSE events. Eyre returns a 204 response.

Kick ships from a group. Takes an UrbitEx.Session struct and an UrbitEx.Resource struct, and a list of ships to kick out. Triggers one groupUpdate event. Eyre returns a 204 even for bad grammar.

Leaves an Urbit group. Takes an UrbitEx.Session struct and an UrbitEx.Resoure struct. Leaving a group triggers 4 metadata-update events and one groupUpdate SSE event. Eyre returns a 200 response.

Make a group private. Takes an UrbitEx.Session struct and an UrbitEx.Resource struct. Triggers one groupUpdate event. Eyre returns a 204 response.

Make a group private. Takes an UrbitEx.Session struct and an UrbitEx.Resource struct. Triggers one groupUpdate event. Eyre returns a 204 response.

Link to this section Functions

Link to this function

ban_ranks_from_group(session, group, ranks)

View Source

Ban ranks from a group. Takes an UrbitEx.Session struct and an UrbitEx.Resource struct, and a list of ranks to ban. Triggers one groupUpdate event. Eyre will return a 204 even if done on a private group (where bans are nonsensical).

Link to this function

ban_ships_from_group(session, group, ships)

View Source

Ban ships from a group. Takes an UrbitEx.Session struct and an UrbitEx.Resource struct, and a list of ships to ban. Triggers one groupUpdate event. Eyre will return a 204 even if done on a private group (where bans are nonsensical).

Link to this function

create_group(session, name, title, description, type, opts \\ [])

View Source

Creates an Urbit group. Takes an UrbitEx.Session struct, a name string, a description string, a type string (either "open" or "invite", i.e open or private), an optional list of options. Options are banned ranks ("czar", "duke", "earl", "king", and/or "pawn"), banned ships, or invitees, for "invite" groups. TODO: options don't appear to work on group creation Landscape forces the name to be equal to the title (but ascii lower case, no spaces) but it can be different. If successful it triggers 1 metadata-update and 2 groupUpdate events. Eyre returns a 200 response.

Link to this function

delete_group(session, resource)

View Source

Deletes group. Takes an UrbitEx.Session struct and an UrbitEx.Resource struct. Triggers one groupUpdate event and one metadata-update event. Eyre returns a 200 response.

Link to this function

invite(session, resource, invitees, message)

View Source

Invite ship to an Urbit Group. Takes an UrbitEx.Session struct and an UrbitEx.Resource struct, a list of invitees and an invite message. Triggers two group-update events. Invitees will get an invite-update event.

Link to this function

join_group(session, resource)

View Source

Joins a public urbit group. Takes an UrbitEx.Session struct and an UrbitEx.Resource struct. Joining a group, if successful, triggers 4 group-view-update, 1 groupUpdate and 1 metadata-update SSE events. Eyre returns a 204 response.

Link to this function

kick_from_group(session, group, ships)

View Source

Kick ships from a group. Takes an UrbitEx.Session struct and an UrbitEx.Resource struct, and a list of ships to kick out. Triggers one groupUpdate event. Eyre returns a 204 even for bad grammar.

Link to this function

leave_group(session, resource)

View Source

Leaves an Urbit group. Takes an UrbitEx.Session struct and an UrbitEx.Resoure struct. Leaving a group triggers 4 metadata-update events and one groupUpdate SSE event. Eyre returns a 200 response.

Link to this function

make_group_private(session, group)

View Source

Make a group private. Takes an UrbitEx.Session struct and an UrbitEx.Resource struct. Triggers one groupUpdate event. Eyre returns a 204 response.

Link to this function

make_group_public(session, group)

View Source

Make a group private. Takes an UrbitEx.Session struct and an UrbitEx.Resource struct. Triggers one groupUpdate event. Eyre returns a 204 response.