compose

package
v0.0.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 21, 2024 License: AGPL-3.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

View Source
const (
	NONE pageDirection = ""
	NEXT pageDirection = "next"
	PREV pageDirection = "prev"
)

Variables

View Source
var (
	ChatsTrending = Request{Method: "GET", Path: "/chats/trending"}
)

Functions

func Contacts

func Contacts(limit int) turnpike.Call

call out to get chat contacts

func CreateChannel

func CreateChannel(kind ChannelType, id, title, description, coverURL string, invitedIDs []string) turnpike.Call

func DMChannelName

func DMChannelName(self string, them []string) string

func EventsIn

func EventsIn(channel string) turnpike.Subscribe

subscribe to events happening in a channel

func ExitChannel

func ExitChannel(channel string) turnpike.Call

func GetChannel

func GetChannel(channel string) turnpike.Call

func GetDMChannel

func GetDMChannel(id string, them ...string) turnpike.Call

func HideChannel

func HideChannel(channel string) turnpike.Call

func Invite

func Invite(channel string, users []string) turnpike.Call

func InviteResponse

func InviteResponse(channel string, accept bool) turnpike.Call

func JoinChannel

func JoinChannel(channel string) turnpike.Call

func JoinedChannels

func JoinedChannels(id string) turnpike.Subscribe

func Kick

func Kick(channel, user string) turnpike.Call

func ListMessages

func ListMessages(channel string, limit int, page Page[int]) turnpike.Call

func MessageTo

func MessageTo(channel, text string) turnpike.Publish

publish a text message to a channel

func NewChannel

func NewChannel(title, name, description string, invite []string, channelType ChannelType) turnpike.Call

func Operators

func Operators(channel string) turnpike.Call

func ReceiveInvite

func ReceiveInvite(id string) turnpike.Subscribe

func SearchContacts

func SearchContacts(query string, limit int) turnpike.Call

func URI

func URI(name string) turnpike.URI

Types

type ChannelJoinState

type ChannelJoinState int
const (
	NotJoined ChannelJoinState = 0
	Invited   ChannelJoinState = 1
	Joined    ChannelJoinState = 2
)

type ChannelRole

type ChannelRole int
const (
	RoleDM     ChannelRole = 0 // ?
	RoleNormie ChannelRole = 2 // ???
)

type ChannelType

type ChannelType int
const (
	ChannelDM      ChannelType = 1
	ChannelPrivate ChannelType = 2
	ChannelPublic  ChannelType = 3
)

type Page

type Page[T int | string] struct {
	Key   pageDirection
	Value T
}

func Next

func Next[T int | string](value T) Page[T]

func NoPage

func NoPage[T int | string]() Page[T]

func Prev

func Prev[T int | string](value T) Page[T]

type Request

type Request struct {
	Method, Path string
	Body         io.Reader
	Query        url.Values
}

func ChatsQuery

func ChatsQuery(query string, limit int, page Page[string]) Request

func Comments added in v0.0.7

func Comments(id string, limit int, page Page[string]) Request

func ContentByID

func ContentByID(id string) Request

func Explore added in v0.0.9

func Explore(id string, limit int, page Page[string]) Request

content_top_today content_top_this_week content_top_year_{2024..2018} content_top_month_{january..december} content_top_overall content_top_by_share content_shuffle

channel-wtf channel-animals channel-games channel-comic channel-video channel-sports channel-ifunny-originals channel-wholesome-wednesday

category-animals-nature category-anime-manga category-art-creative category-cars category-celebrities category-gaming category-girls category-internet category-memes category-movies category-other category-politics category-science-tech

users_top_by_featured users_top_by_subscribers users_top_by_content_views users_top_overall

chats_popular_last_week chats_new_chats chats_top_by_members

func Feed

func Feed(feed string, limit int, page Page[string]) Request

func Timeline

func Timeline(id string, limit int, page Page[string]) Request

func UserAccount

func UserAccount() Request

func UserByID

func UserByID(id string) Request

func UserByNick

func UserByNick(nick string) Request

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL