Documentation ¶
Index ¶
- func ApiRequest(endpointUrl, contentType, responseType, cookies, sapisid string, ...) ([]byte, error)
- func GetAuthHeaders(sapisid string) map[string]string
- type Client
- func (c *Client) AddUser(inviteesGaiaIds []string, conversationId string) (*hangouts.AddUserResponse, error)
- func (c *Client) CreateConversation(inviteesGaiaIds []string, name string, oneOnOne bool) (*hangouts.CreateConversationResponse, error)
- func (c *Client) DeleteConversation(conversationId string, deleteUpperBoundTimestamp uint64) (*hangouts.DeleteConversationResponse, error)
- func (c *Client) EasterEgg(conversationId string, message string) (*hangouts.EasterEggResponse, error)
- func (c *Client) GetConversation(conversationId string, includeEvent bool, maxEventsPerConversation uint64) (*hangouts.GetConversationResponse, error)
- func (c *Client) GetEntityById(gaiaIds []string) (*hangouts.GetEntityByIdResponse, error)
- func (c *Client) GetSelfInfo() (*hangouts.GetSelfInfoResponse, error)
- func (c *Client) NewEventRequestHeaders(conversationId string, offTheRecord bool) *hangouts.EventRequestHeader
- func (c *Client) NewRequestHeaders() *hangouts.RequestHeader
- func (c *Client) ProtobufApiRequest(apiEndpoint string, requestStruct, responseStruct proto.Message) error
- func (c *Client) QueryPresence(gaiaId string) (*hangouts.QueryPresenceResponse, error)
- func (c *Client) RemoveUser(conversationId string) (*hangouts.RemoveUserResponse, error)
- func (c *Client) RenameConversation(conversationId, newName string) (*hangouts.RenameConversationResponse, error)
- func (c *Client) SearchEntities(query string, maxCount uint64) (*hangouts.SearchEntitiesResponse, error)
- func (c *Client) SendChatMessage(conversationId, message string) (*hangouts.SendChatMessageResponse, error)
- func (c *Client) SendOffnetworkInvitation(email string) (*hangouts.SendOffnetworkInvitationResponse, error)
- func (c *Client) SetActiveClient(email string, isActive bool, timeoutSecs uint64) (*hangouts.SetActiveClientResponse, error)
- func (c *Client) SetConversationNotificationLevel(conversationId string, setQuiet bool) (*hangouts.SetConversationNotificationLevelResponse, error)
- func (c *Client) SetFocus(conversationId string, unfocus bool, timeoutSecs uint32) (*hangouts.SetFocusResponse, error)
- func (c *Client) SetPresence(presenceState int32, timeoutSecs uint64) (*hangouts.SetPresenceResponse, error)
- func (c *Client) SetTyping(conversationId string, typingState int32) (*hangouts.SetTypingResponse, error)
- func (c *Client) SyncAllNewEvents(lastSyncTimestamp, maxResponseSizeBytes uint64) (*hangouts.SyncAllNewEventsResponse, error)
- func (c *Client) SyncRecentConversations(maxConversations, maxEventsPerConversation uint64) (*hangouts.SyncRecentConversationsResponse, error)
- func (c *Client) UpdateWatermark(conversationId string, lastReadTimestamp uint64) (*hangouts.UpdateWatermarkResponse, error)
- type Session
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApiRequest ¶
func GetAuthHeaders ¶
Types ¶
type Client ¶
func (*Client) AddUser ¶
func (c *Client) AddUser(inviteesGaiaIds []string, conversationId string) (*hangouts.AddUserResponse, error)
Invite users to join an existing group conversation.
func (*Client) CreateConversation ¶
func (c *Client) CreateConversation(inviteesGaiaIds []string, name string, oneOnOne bool) (*hangouts.CreateConversationResponse, error)
Create a new conversation.
func (*Client) DeleteConversation ¶
func (c *Client) DeleteConversation(conversationId string, deleteUpperBoundTimestamp uint64) (*hangouts.DeleteConversationResponse, error)
Leave a one-to-one conversation. One-to-one conversations are "sticky"; they can't actually be deleted. This API clears the event history of the specified conversation up to delete_upper_bound_timestamp, hiding it if no events remain.
func (*Client) EasterEgg ¶
func (c *Client) EasterEgg(conversationId string, message string) (*hangouts.EasterEggResponse, error)
Send an easter egg event to a conversation.
func (*Client) GetConversation ¶
func (c *Client) GetConversation(conversationId string, includeEvent bool, maxEventsPerConversation uint64) (*hangouts.GetConversationResponse, error)
Return conversation info and recent events.
func (*Client) GetEntityById ¶
Return info about a list of users.
func (*Client) GetSelfInfo ¶
Return info about the current user.
func (*Client) NewEventRequestHeaders ¶
func (*Client) NewRequestHeaders ¶
func (c *Client) NewRequestHeaders() *hangouts.RequestHeader
* Helper Methods * *
func (*Client) ProtobufApiRequest ¶
func (*Client) QueryPresence ¶
Return presence status for a list of users. doesnt support passing an array of gaiaIds. fails with: {"status":4,"error_description":"Duplicate ParticipantIds in request"}
func (*Client) RemoveUser ¶
Leave a group conversation.
func (*Client) RenameConversation ¶
func (c *Client) RenameConversation(conversationId, newName string) (*hangouts.RenameConversationResponse, error)
Rename a conversation. Both group and one-to-one conversations may be renamed, but the official Hangouts clients have mixed support for one-to-one conversations with custom names.
func (*Client) SearchEntities ¶
func (c *Client) SearchEntities(query string, maxCount uint64) (*hangouts.SearchEntitiesResponse, error)
Return info for users based on a query.
func (*Client) SendChatMessage ¶
func (c *Client) SendChatMessage(conversationId, message string) (*hangouts.SendChatMessageResponse, error)
Send a chat message to a conversation.
func (*Client) SendOffnetworkInvitation ¶
func (c *Client) SendOffnetworkInvitation(email string) (*hangouts.SendOffnetworkInvitationResponse, error)
Send an invitation to a non-contact.
func (*Client) SetActiveClient ¶
func (c *Client) SetActiveClient(email string, isActive bool, timeoutSecs uint64) (*hangouts.SetActiveClientResponse, error)
Set the active client. timeout is 120 secs in hangups
func (*Client) SetConversationNotificationLevel ¶
func (c *Client) SetConversationNotificationLevel(conversationId string, setQuiet bool) (*hangouts.SetConversationNotificationLevelResponse, error)
Set the notification level of a conversation.
func (*Client) SetFocus ¶
func (c *Client) SetFocus(conversationId string, unfocus bool, timeoutSecs uint32) (*hangouts.SetFocusResponse, error)
Set focus to a conversation.
func (*Client) SetPresence ¶
func (c *Client) SetPresence(presenceState int32, timeoutSecs uint64) (*hangouts.SetPresenceResponse, error)
Set the presence status. presenceState: 1=NONE 30=IDLE 40=ACTIVE
func (*Client) SetTyping ¶
func (c *Client) SetTyping(conversationId string, typingState int32) (*hangouts.SetTypingResponse, error)
Set the typing status of a conversation. typingState: 1=Started 2=Paused 3=Stopped
func (*Client) SyncAllNewEvents ¶
func (c *Client) SyncAllNewEvents(lastSyncTimestamp, maxResponseSizeBytes uint64) (*hangouts.SyncAllNewEventsResponse, error)
List all events occurring at or after a timestamp.
func (*Client) SyncRecentConversations ¶
func (c *Client) SyncRecentConversations(maxConversations, maxEventsPerConversation uint64) (*hangouts.SyncRecentConversationsResponse, error)
Return info on recent conversations and their events.