Documentation
¶
Index ¶
- func DiscoverAPI() (string, error)
- type Chat
- type ChatsResponse
- type Client
- func (c *Client) GetChat(chatID string) (*Chat, error)
- func (c *Client) ListChats() ([]Chat, error)
- func (c *Client) ListMessages(chatID string, limit int) ([]Message, error)
- func (c *Client) Ping() error
- func (c *Client) SearchMessages(query string, limit int) ([]Message, error)
- func (c *Client) SendMessage(chatID, message string) (string, error)
- func (c *Client) SetAuthToken(token string)
- type Message
- type MessagesResponse
- type SearchResponse
- type SendMessageRequest
- type SendMessageResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DiscoverAPI ¶
DiscoverAPI attempts to auto-discover the Beeper Desktop API URL
Types ¶
type Chat ¶
type Chat struct {
ID string `json:"id"`
Title string `json:"title"`
Type string `json:"type"`
Network string `json:"network"`
UnreadCount int `json:"unreadCount"`
IsMuted bool `json:"isMuted"`
IsArchived bool `json:"isArchived"`
IsPinned bool `json:"isPinned"`
// Store participants as raw JSON since it's a complex nested object
Participants map[string]interface{} `json:"participants"`
}
Chat represents a Beeper chat/conversation Using a simplified structure that works with JSON unmarshaling
type ChatsResponse ¶
Chat represents a Beeper chat/conversation ChatsResponse represents the API response for listing chats
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client handles communication with Beeper Desktop API
func (*Client) ListMessages ¶
ListMessages retrieves messages from a chat
func (*Client) SearchMessages ¶
SearchMessages searches for messages across all chats
func (*Client) SendMessage ¶
SendMessage sends a message to a chat and returns the message ID
func (*Client) SetAuthToken ¶
SetAuthToken sets the Bearer authentication token
type Message ¶
type Message struct {
ID string `json:"id"`
ChatID string `json:"chatID"`
Sender string `json:"senderName"`
Text string `json:"text"`
Timestamp string `json:"timestamp"` // ISO 8601 timestamp string
IsSender bool `json:"isSender"`
}
Message represents a Beeper message
type MessagesResponse ¶
MessagesResponse represents the API response for listing messages
type SearchResponse ¶
type SearchResponse struct {
Items []Message `json:"items"`
}
SearchResponse represents the API response for searching messages
type SendMessageRequest ¶
type SendMessageRequest struct {
Text string `json:"text"`
}
SendMessageRequest represents a message send request
type SendMessageResponse ¶
type SendMessageResponse struct {
ID string `json:"id"`
}
SendMessageResponse represents the API response after sending a message