clients

package
v0.0.0-...-cc1490b Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2020 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chat

type Chat struct {
	ID                int    `json:"id"`
	Token             string `json:"token"`
	ActorType         string `json:"actorType"` // guest, user
	ActorID           string `json:"actorId"`
	ActorDisplayName  string `json:"actorDisplayName"`
	IsReplyable       bool   `json:"isReplyable"`
	Message           string `json:"message"`
	MessageParameters string `json:"messageParamertes"` //RichObjectString
}

Chat is a chat message.

type ChatResponse

type ChatResponse struct {
	OCS struct {
		Data []Chat `json:"data"`
	} `json:"ocs"`
}

ChatResponse is the API response for chats.

type NextcloudTalk

type NextcloudTalk struct {
	// contains filtered or unexported fields
}

NextcloudTalk is a Nextcloud Talk client.

func NewNextcloudTalk

func NewNextcloudTalk(url, username, password, dbLocation string, chatChan chan Chat, statusChan chan string) *NextcloudTalk

NewNextcloudTalk creates a new Nextcloud Talk Client.

func (*NextcloudTalk) Close

func (n *NextcloudTalk) Close() error

Close closes the client.

func (*NextcloudTalk) Open

func (n *NextcloudTalk) Open() error

Open opens the client.

func (*NextcloudTalk) ReadChats

func (n *NextcloudTalk) ReadChats() error

ReadChats reads the chats.

func (*NextcloudTalk) ReadRooms

func (n *NextcloudTalk) ReadRooms() error

ReadRooms reads the rooms.

func (*NextcloudTalk) WriteChat

func (n *NextcloudTalk) WriteChat(room string, message string) error

WriteChat writes a chat.

type Room

type Room struct {
	ID          int    `json:"id"`
	Token       string `json:"token"`
	Name        string `json:"name"`
	DisplayName string `json:"displayName"`
}

Room is a chat room

type RoomResponse

type RoomResponse struct {
	OCS struct {
		Data []Room `json:"data"`
	} `json:"ocs"`
}

RoomResponse is the API response for rooms

Jump to

Keyboard shortcuts

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