rest

package
v0.0.0-...-8bc772b Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2020 License: MIT Imports: 15 Imported by: 1

README

chat.*

/api/v1/chat.delete
Deletes an existing chat message.
Link
/api/v1/chat.followMessage
Follows an existing chat message.
Link
/api/v1/chat.getDeletedMessages
Retrieves the deleted messages since specific date.
Link
/api/v1/chat.getDiscussions
Retrieves the discussions of a room.
Link
/api/v1/chat.getMentionedMessages
Retrieves the mentioned messages.
Link
/api/v1/chat.getMessage
Retrieves a single chat message.
Link
/api/v1/chat.getMessageReadReceipts (可能被弃用)
Retrieves message read receipts.
Link
/api/v1/chat.getPinnedMessages
Retrieve pinned messages from a room.
Link
/api/v1/chat.getSnippetedMessages (暂时没写 模板信息 可能需要管理员权限)
Retrieves snippeted messages.
Link
/api/v1/chat.getSnippetedMessageById (暂时没写 模板信息 可能需要管理员权限)
Retrieves snippeted message by id.
Link
/api/v1/chat.getStarredMessages
Retrieves the starred messages.
Link
/api/v1/chat.getThreadMessages
Retrieves thread's messages.
Link
/api/v1/chat.getThreadsList
Retrieves channel's threads.
Link
/api/v1/chat.ignoreUser
Ignores an user from a chat.
Link
/api/v1/chat.pinMessage
Pins a chat message to the message's channel.
Link
/api/v1/chat.postMessage
Posts a new chat message.
Link
/api/v1/chat.react
Sets/unsets the user's reaction to an existing chat message.
Link
/api/v1/chat.reportMessage  (举报消息)
Reports a message.
Link
/api/v1/chat.search
Search for messages in a channel.
Link
/api/v1/chat.starMessage
Stars a chat message for the authenticated user.
Link
/api/v1/chat.sendMessage  (有Bug (去掉返回信息的avator alias 就行))
Send new chat message.
Link
/api/v1/chat.syncThreadMessages
Retrieves synced thread's messages.
Link
/api/v1/chat.syncThreadsList
Retrieves thread's synced channel threads.
Link
/api/v1/chat.unfollowMessage
Unfollows an existing chat message.
Link
/api/v1/chat.unPinMessage
Removes the pinned status of the provided chat message.
Link
/api/v1/chat.unStarMessage
Removes the star on the chat message for the authenticated user.
Link
/api/v1/chat.update
Updates the text of the chat message.
Link

LiveChat.*

/api/v1/livechat/users/:type
Get a list of agents or managers.
Link
/api/v1/livechat/users/:type
Create a new Livechat agent or manager.
Link
/api/v1/livechat/users/:type/:_id
Retrieve agent or manager data.
Link
/api/v1/livechat/users/:type/:_id
Removes a Livechat agent or manager.
Link
/api/v1/livechat/department
Get a list of Livechat departments.
Link
/api/v1/livechat/department
Creates a new Livechat department.
Link
/api/v1/livechat/department/:_id
Retrieve a Livechat department data.
Link
/api/v1/livechat/department/:_id
Updates a Livechat department data.
Link
/api/v1/livechat/department/:_id
Delete a Livechat department.
Link
/api/v1/livechat/inquiries.list
Retrieves a list of open inquiries.
Link
/api/v1/livechat/inquiries.take (未完全测试,不太理解)
Take an open inquiry.
Link
/api/v1/livechat/inquiries.getOne
Get one inquiry by room id.
Link
/api/v1/livechat/integrations.settings
Retrieves a list of integration settings.
Link
/api/v1/livechat/agent.info/:rid/:token
Retrieve the current Livechat agent data.
Link
/api/v1/livechat/agent.next/:token (测试通过,但不太理解)
~/Projects/test/Rocket.Chat.Go.SDK
Link
/api/v1/livechat/agents/:agentId/departments
Get the agent departments.
Link
/api/v1/livechat/config/:token
Get basic Livechat widget configuration info and additional visitor data.
Link
/api/v1/livechat/custom.field
Send a Livechat custom field.
Link
/api/v1/livechat/custom.fields
Send an array of Livechat custom fields.
Link
/api/v1/livechat/custom-fields
Get a list of Livechat custom fields.
Link
/api/v1/livechat/custom-fields/:_id
Get a Livechat custom field.
Link
/api/v1/livechat/message
end a new Livechat message.
Link
/api/v1/livechat/message/:_id
Updates a Livechat message data.
Link
/api/v1/livechat/message/:_id
Delete a Livechat message.
Link
/api/v1/livechat/messages.history/:rid
Load Livechat messages history.
Link
/api/v1/livechat/office-hours
Get a list of office hours.
Link
/api/v1/livechat/offline.message (测试通过,但没理解机制)
Send a new Livechat offline message.
Link
/api/v1/livechat/rooms
Retrieves a list of livechat rooms.
Link
/api/v1/livechat/queue
Retrieves a list of queued chats.
Link
/api/v1/livechat/room
Get the Livechat room data or open a new room.
Link
/api/v1/livechat/room.close
Close a Livechat room.
Link
/api/v1/livechat/room.transfer
Transfer a Livechat room to another agent or department.
Link
/api/v1/livechat/room.forward
Allow Livechat Agents to forward a Livechat room to another agent, department or return it back to the Queue.
Link
/api/v1/livechat/room.survey
Send a Livechat survey to Rocket.Chat.
Link
/api/v1/livechat/transcript
Request a Livechat transcript.
Link
/api/v1/livechat/triggers
Get the Livechat triggers.
Link
/api/v1/livechat/triggers/:_id
Get a Livechat trigger.
Link
/api/v1/livechat/visitor
Register a new Livechat visitor.
Link
/api/v1/livechat/visitor/:token
Retrieve a visitor data.
Link
/api/v1/livechat/visitors.info
Retrieve a visitor info.
Link
/api/v1/livechat/page.visited
Send visitor navigation history to Rocket.Chat.
Link
/api/v1/livechat/appearance
Get the settings about Livechat Widget Appearance.
Link
/api/v1/livechat/visitors.chatHistory/room/room-id/visitor/visitor-id
Gets the visitor chat history.
Link

Channel.*

/api/v1/channels.addAll  (false Access to Method Forbidden [403] 可能需要管理员权限)
Adds all of the users on the server to a channel.
Link
/api/v1/channels.addLeader
Gives the role of Leader for a user in the current channel.
Link
/api/v1/channels.addModerator
Gives the role of moderator to a user in a channel.
Link
/api/v1/channels.addOwner
Gives the role of owner to a user in a channel.
Link
/api/v1/channels.anonymousread  (暂时没写 需要设置匿名聊天)
Gets the messages in public channels to an anonymous user
Link
/api/v1/channels.archive
Archives a channel.
Link
/api/v1/channels.close
Removes a channel from a user's list of channels.
Link
/api/v1/channels.counters
Gets channel counters.
Link
/api/v1/channels.create
Creates a new channel.
Link
/api/v1/channels.delete
Removes a channel.
Link
/api/v1/channels.getAllUserMentionsByChannel
Get all the mentions of a channel.
Link
/api/v1/channels.files
Gets a list of files from a channel.
Link
/api/v1/channels.getIntegrations  (暂时没写 需要开启integrations功能)
Gets the channel's integration.
Link
/api/v1/channels.history
Retrieves the messages from a channel.
Link
/api/v1/channels.info
Gets a channel's information.
Link
/api/v1/channels.invite
Adds a user to a channel.
Link
/api/v1/channels.join
Joins yourself to a channel.
Link
/api/v1/channels.kick
Removes a user from a channel.
Link
/api/v1/channels.leave
Removes the calling user from a channel.
Link
/api/v1/channels.list
Retrieves all of the channels from the server.
Link
/api/v1/channels.list.joined
Gets only the channels the calling user has joined.
Link
/api/v1/channels.members
Retrieves all channel users.
Link
/api/v1/channels.messages  (返回结构可能不完整)
Retrieves all channel messages.
Link
/api/v1/channels.moderators
List all moderators of a channel.
Link
/api/v1/channels.online
List all online users of a channel.
Link
/api/v1/channels.open
Adds the channel back to the user's list of channels.
Link
/api/v1/channels.removeleader
Removes the role of Leader for a user in the current channel.
Link
/api/v1/channels.removeModerator
Removes the role of moderator from a user in a channel.
Link
/api/v1/channels.removeOwner
Removes the role of owner from a user in a channel.
Link
/api/v1/channels.rename
Changes a channel's name.
Link
/api/v1/channels.roles
Gets the user's roles in the channel.
Link
/api/v1/channels.setAnnouncement
Sets a channel's announcement.
Link
/api/v1/channels.setCustomFields (测试通过  作用机制不明确)
Sets a channel's custom fields.
Link
/api/v1/channels.setDefault
Sets a channel's default status.
Link
/api/v1/channels.setDescription
Sets a channel's description.
Link
/api/v1/channels.setJoinCode
Sets the channel's code required to join it.
Link
/api/v1/channels.setPurpose  (没写 文档里这么说 Sets the description for the channel (the same as channels.setDescription, obsolete).)
Sets a channel's description.
Link
/api/v1/channels.setReadOnly
Sets whether a channel is read only or not.
Link
/api/v1/channels.setTopic
Sets a channel's topic.
Link
/api/v1/channels.setType
Sets the type of room the channel should be.
Link
/api/v1/channels.unarchive (需要管理员权限)
Unarchives a channel.
Links

Group.*

/api/v1/groups.addAll (需要管理员权限)
Adds all of the users on the server to a private group.
Link
/api/v1/groups.addLeader
Gives the role of Leader for a user in the current group.
Link
/api/v1/groups.addModerator
Gives the role of moderator to a user in a group.
Link
/api/v1/groups.addOwner
Gives the role of owner to a user in a group.
Link
/api/v1/groups.archive
Archives a private group.
Link
/api/v1/groups.close
Removes a private group from the list of groups.
Link
/api/v1/groups.counters
Gets group counters.
Link
/api/v1/groups.create
Creates a new private group.
Link
/api/v1/groups.delete
Removes a private group.
Link
/api/v1/groups.files
Gets a list of files from a private group.
Link
/api/v1/groups.getIntegrations (暂时没写 需要开启相关功能)
Gets the integrations assigned to the group.
Link
/api/v1/groups.history
Retrieves the messages from a private group.
Link
/api/v1/groups.info
Gets the information about a private group.
Link
/api/v1/groups.invite
Adds a user to the private group.
Link
/api/v1/groups.kick
Removes a user from a private group.
Link
/api/v1/groups.leave
Removes the calling user from the private group.
Link
/api/v1/groups.list
List the private groups the caller is part of.
Link
/api/v1/groups.listAll
List all the private groups.
Link
/api/v1/groups.moderators
List all moderators of a group.
Link
/api/v1/groups.members
Gets the users of participants of a private group.
Link
/api/v1/groups.messages
Retrieves all group messages.
Link
/api/v1/groups.online
List all online users of a group.
Link
/api/v1/groups.open
Adds the private group back to the list of groups.
Link
/api/v1/groups.removeLeader
Removes the role of Leader for a user in the current group.
Link
/api/v1/groups.removeModerator
Removes the role of moderator from a user in a group.
Link
/api/v1/groups.removeOwner
Removes the role of owner from a user in a group.
Link
/api/v1/groups.rename
Changes the name of the private group.
Link
/api/v1/groups.roles
Gets the user's roles in the private group.
Link
/api/v1/groups.setAnnouncement
Sets a group's announcement.
Link
/api/v1/groups.setCustomFields (不知道干啥的)
Sets private group's custom fields.
Link
/api/v1/groups.setDescription
Sets a private group's description.
Link
/api/v1/groups.setPurpose (没写 功能跟上一个重复)
Sets a private group's description.
Link
/api/v1/groups.setReadOnly
Sets whether the room is read only or not.
Link
/api/v1/groups.setTopic
Sets a private group's topic.
Link
/api/v1/groups.setType
Sets the type of room this group will be.
Link
/api/v1/groups.unarchive (需要管理员权限)
Unarchives a private group.
Link

Documentation

Overview

Package rest provides a RocketChat rest client.

Index

Constants

This section is empty.

Variables

View Source
var (
	ResponseErr = fmt.Errorf("got false response")
)

Functions

func MustOpen

func MustOpen(f string) *os.File

Types

type AddUserToRoleResponse

type AddUserToRoleResponse struct {
	Status
	Role struct {
		ID          string    `json:"_id"`
		Name        string    `json:"name"`
		Scope       string    `json:"scope"`
		Description string    `json:"description"`
		UpdatedAt   time.Time `json:"_updatedAt"`
	} `json:"role"`
}

type AgentDepartmentResponse

type AgentDepartmentResponse struct {
	Departments []struct {
		ID           string    `json:"_id"`
		AgentID      string    `json:"agentId"`
		DepartmentID string    `json:"departmentId"`
		UpdatedAt    time.Time `json:"_updatedAt"`
		Count        int       `json:"count"`
		Order        int       `json:"order"`
		Username     string    `json:"username"`
	} `json:"departments"`
	Status
}

type AgentInfoResponse

type AgentInfoResponse struct {
	Status
	Agent struct {
		ID       string `json:"_id"`
		Name     string `json:"name"`
		Username string `json:"username"`
		Status   string `json:"status"`
	} `json:"agent"`
}

type AppearanceResponse

type AppearanceResponse struct {
	Appearance []models.Appearance
	Status
}

type AssetSetResponse

type AssetSetResponse struct {
	Status
}

type AssetUnSetResponse

type AssetUnSetResponse struct {
	Status
}

type AuthFacebookLoginRequest

type AuthFacebookLoginRequest struct {
	ServiceName string `json:"serviceName"`
	AccessToken string `json:"accessToken"`
	Secret      string `json:"secret"`
	ExpiresIn   int    `json:"expiresIn"`
}

type AuthGoogleLoginRequest

type AuthGoogleLoginRequest struct {
	ServiceName string `json:"serviceName"`
	AccessToken string `json:"accessToken"`
	IDToken     string `json:"idToken"`
	ExpiresIn   int    `json:"expiresIn"`
	Scope       string `json:"scope"`
}

type AuthInfo

type AuthInfo struct {
	Token string
	ID    string
}

type AuthLoginRequest

type AuthLoginRequest struct {
	User     string `json:"user"`
	Password string `json:"password"`
	Resume   string `jsonL:resume`
}

type AuthLoginResponse

type AuthLoginResponse struct {
	Data models.AuthData `json:"data"`
	Status
}

type AuthLogoutResponse

type AuthLogoutResponse struct {
	Status
	Data struct {
		Message string `json:"message"`
	} `json:"data"`
}

type AuthMeResponse

type AuthMeResponse struct {
	models.Me
	Status
}

type AuthTwitterLoginRequest

type AuthTwitterLoginRequest struct {
	ServiceName       string `json:"serviceNae"`
	AccessToken       string `json:"accessToken"`
	AccessTokenSecret string `json:"accessTokenSecret"`
	AppSecret         string `json:"appSecret"`
	AppId             string `json:"appId"`
	ExpiresIn         int    `json:"expiresIn"`
}

type ChannelAddAllResponse

type ChannelAddAllResponse struct {
	Status
	Channel struct {
		ID        string   `json:"_id"`
		Name      string   `json:"name"`
		T         string   `json:"t"`
		Usernames []string `json:"usernames"`
		Msgs      int      `json:"msgs"`
		U         struct {
			ID       string `json:"_id"`
			Username string `json:"username"`
		} `json:"u"`
		Ts time.Time `json:"ts"`
	} `json:"channel"`
}

type ChannelAddLeaderResponse

type ChannelAddLeaderResponse struct {
	Status
}

type ChannelAddModeratorResponse

type ChannelAddModeratorResponse struct {
	Status
}

type ChannelAddOwnerResponse

type ChannelAddOwnerResponse struct {
	Status
}

type ChannelAnnouncementResponse

type ChannelAnnouncementResponse struct {
	Status
	Announcement string `json:"announcement"`
}

type ChannelAnonymousreadResponse

type ChannelAnonymousreadResponse struct {
	Status
	Messages []struct {
		ID          string        `json:"_id"`
		Alias       string        `json:"alias"`
		Msg         string        `json:"msg"`
		Attachments []interface{} `json:"attachments"`
		ParseUrls   bool          `json:"parseUrls,omitempty"`
		Bot         struct {
			I string `json:"i"`
		} `json:"bot,omitempty"`
		Groupable bool      `json:"groupable,omitempty"`
		Ts        time.Time `json:"ts"`
		U         struct {
			ID       string `json:"_id"`
			Username string `json:"username"`
			Name     string `json:"name"`
		} `json:"u"`
		Rid       string    `json:"rid"`
		UpdatedAt time.Time `json:"_updatedAt"`
		Reactions struct {
			Grin struct {
				Usernames []string `json:"usernames"`
			} `json:":grin:"`
		} `json:"reactions,omitempty"`
		Mentions []interface{} `json:"mentions"`
		Channels []interface{} `json:"channels"`
		Starred  struct {
			ID string `json:"_id"`
		} `json:"starred,omitempty"`
		Emoji    string `json:"emoji,omitempty"`
		Avatar   string `json:"avatar,omitempty"`
		EditedBy struct {
			ID       string `json:"_id"`
			Username string `json:"username"`
		} `json:"editedBy,omitempty"`
		EditedAt time.Time     `json:"editedAt,omitempty"`
		Urls     []interface{} `json:"urls,omitempty"`
	} `json:"messages"`
}

type ChannelArchiveResponse

type ChannelArchiveResponse struct {
	Status
}

type ChannelCloseResponse

type ChannelCloseResponse struct {
	Status
}

type ChannelCountersResponse

type ChannelCountersResponse struct {
	Status
	Joined       bool      `json:"joined"`
	Members      int       `json:"members"`
	Unreads      int       `json:"unreads"`
	UnreadsFrom  time.Time `json:"unreadsFrom"`
	Msgs         int       `json:"msgs"`
	Latest       time.Time `json:"latest"`
	UserMentions int       `json:"userMentions"`
}

type ChannelCreateResponse

type ChannelCreateResponse struct {
	Status
	Channel struct {
		ID        string   `json:"_id"`
		Name      string   `json:"name"`
		T         string   `json:"t"`
		Usernames []string `json:"usernames"`
		Msgs      int      `json:"msgs"`
		U         struct {
			ID       string `json:"_id"`
			Username string `json:"username"`
		} `json:"u"`
		Ts time.Time `json:"ts"`
	} `json:"channel"`
}

type ChannelCustomFieldsResponse

type ChannelCustomFieldsResponse struct {
	Status
	Channel struct {
		ID           string    `json:"_id"`
		Ts           time.Time `json:"ts"`
		T            string    `json:"t"`
		Name         string    `json:"name"`
		Msgs         int       `json:"msgs"`
		Default      bool      `json:"default"`
		UpdatedAt    time.Time `json:"_updatedAt"`
		Lm           time.Time `json:"lm"`
		CustomFields struct {
			Organization string `json:"organization"`
		} `json:"customFields"`
	} `json:"channel"`
	DeveloperWarning string `json:"developerWarning"`
}

type ChannelDefaultResponse

type ChannelDefaultResponse struct {
	Status
	Channel struct {
		ID   string `json:"_id"`
		Name string `json:"name"`
		T    string `json:"t"`
		Msgs int    `json:"msgs"`
		U    struct {
			ID       string `json:"_id"`
			Username string `json:"username"`
		} `json:"u"`
		Ts               time.Time     `json:"ts"`
		Ro               bool          `json:"ro"`
		SysMes           bool          `json:"sysMes"`
		UpdatedAt        time.Time     `json:"_updatedAt"`
		Usernames        []string      `json:"usernames"`
		JoinCodeRequired bool          `json:"joinCodeRequired"`
		Muted            []interface{} `json:"muted"`
		Default          bool          `json:"default"`
	} `json:"channel"`
}

type ChannelDeleteResponse

type ChannelDeleteResponse struct {
	Status
}

type ChannelDescriptionResponse

type ChannelDescriptionResponse struct {
	Status
	Description string `json:"description"`
}

type ChannelFilesResponse

type ChannelFilesResponse struct {
	Status
	Files []struct {
		ID          string `json:"_id"`
		Name        string `json:"name"`
		Size        int    `json:"size"`
		Type        string `json:"type"`
		Rid         string `json:"rid"`
		Description string `json:"description"`
		Store       string `json:"store"`
		Complete    bool   `json:"complete"`
		Uploading   bool   `json:"uploading"`
		Extension   string `json:"extension"`
		Progress    int    `json:"progress"`
		User        struct {
			ID       string `json:"_id"`
			Username string `json:"username"`
			Name     string `json:"name"`
		} `json:"user"`
		UpdatedAt  time.Time `json:"_updatedAt"`
		InstanceID string    `json:"instanceId"`
		Etag       string    `json:"etag"`
		Path       string    `json:"path"`
		Token      string    `json:"token"`
		UploadedAt time.Time `json:"uploadedAt"`
		URL        string    `json:"url"`
	} `json:"files"`
}

type ChannelHistoryResponse

type ChannelHistoryResponse struct {
	Status
	Messages []struct {
		ID  string    `json:"_id"`
		Rid string    `json:"rid"`
		Msg string    `json:"msg"`
		Ts  time.Time `json:"ts"`
		U   struct {
			ID       string `json:"_id"`
			Username string `json:"username"`
		} `json:"u"`
		UpdatedAt time.Time `json:"_updatedAt"`
		T         string    `json:"t,omitempty"`
		Groupable bool      `json:"groupable,omitempty"`
	} `json:"messages"`
}

type ChannelInviteResponse

type ChannelInviteResponse struct {
	Status
	Channel struct {
		ID        string    `json:"_id"`
		Ts        time.Time `json:"ts"`
		T         string    `json:"t"`
		Name      string    `json:"name"`
		Usernames []string  `json:"usernames"`
		Msgs      int       `json:"msgs"`
		UpdatedAt time.Time `json:"_updatedAt"`
		Lm        time.Time `json:"lm"`
	} `json:"channel"`
}

type ChannelJoinCodeResponse

type ChannelJoinCodeResponse struct {
	Status
	Channel struct {
		ID   string `json:"_id"`
		Name string `json:"name"`
		T    string `json:"t"`
		Msgs int    `json:"msgs"`
		U    struct {
			ID       string `json:"_id"`
			Username string `json:"username"`
		} `json:"u"`
		Ts               time.Time `json:"ts"`
		Ro               bool      `json:"ro"`
		SysMes           bool      `json:"sysMes"`
		UpdatedAt        time.Time `json:"_updatedAt"`
		Usernames        []string  `json:"usernames"`
		JoinCodeRequired bool      `json:"joinCodeRequired"`
	} `json:"channel"`
}

type ChannelJoinResponse

type ChannelJoinResponse struct {
	Status
	Channel struct {
		ID         string `json:"_id"`
		Name       string `json:"name"`
		Fname      string `json:"fname"`
		T          string `json:"t"`
		Msgs       int    `json:"msgs"`
		UsersCount int    `json:"usersCount"`
		U          struct {
			ID       string `json:"_id"`
			Username string `json:"username"`
		} `json:"u"`
		CustomFields struct {
		} `json:"customFields"`
		Broadcast        bool      `json:"broadcast"`
		Encrypted        bool      `json:"encrypted"`
		Ts               time.Time `json:"ts"`
		Ro               bool      `json:"ro"`
		SysMes           bool      `json:"sysMes"`
		Default          bool      `json:"default"`
		UpdatedAt        time.Time `json:"_updatedAt"`
		JoinCodeRequired bool      `json:"joinCodeRequired"`
	} `json:"channel"`
}

type ChannelKickResponse

type ChannelKickResponse struct {
	Status
	Channel struct {
		ID        string   `json:"_id"`
		Name      string   `json:"name"`
		T         string   `json:"t"`
		Usernames []string `json:"usernames"`
		Msgs      int      `json:"msgs"`
		U         struct {
			ID       string `json:"_id"`
			Username string `json:"username"`
		} `json:"u"`
		Ts        time.Time `json:"ts"`
		Ro        bool      `json:"ro"`
		SysMes    bool      `json:"sysMes"`
		UpdatedAt time.Time `json:"_updatedAt"`
	} `json:"channel"`
}

type ChannelMembersResponse

type ChannelMembersResponse struct {
	Status
	Members []struct {
		ID       string `json:"_id"`
		Username string `json:"username"`
		Name     string `json:"name"`
		Status   string `json:"status"`
	} `json:"members"`
}

type ChannelMentionResponse

type ChannelMentionResponse struct {
	Status
	Mentions []struct {
		ID  string    `json:"_id"`
		Rid string    `json:"rid"`
		Msg string    `json:"msg"`
		Ts  time.Time `json:"ts"`
		U   struct {
			ID       string `json:"_id"`
			Username string `json:"username"`
			Name     string `json:"name"`
		} `json:"u"`
		Mentions []struct {
			ID       string `json:"_id"`
			Username string `json:"username"`
		} `json:"mentions"`
		Channels  []interface{} `json:"channels"`
		UpdatedAt time.Time     `json:"_updatedAt"`
	} `json:"mentions"`
}

type ChannelMessagesResponse

type ChannelMessagesResponse struct {
	Messages []struct {
		ID  string    `json:"_id"`
		Rid string    `json:"rid"`
		Msg string    `json:"msg"`
		Ts  time.Time `json:"ts"`
		U   struct {
			ID       string `json:"_id"`
			Username string `json:"username"`
			Name     string `json:"name"`
		} `json:"u"`
		UpdatedAt time.Time     `json:"_updatedAt"`
		Mentions  []interface{} `json:"mentions"`
		Channels  []interface{} `json:"channels"`
	} `json:"messages"`
	Status
}

type ChannelModeratorsResponse

type ChannelModeratorsResponse struct {
	Status
	Moderators []struct {
		ID       string `json:"_id"`
		Username string `json:"username"`
		Name     string `json:"name"`
	} `json:"moderators"`
}

type ChannelOpenResponse

type ChannelOpenResponse struct {
	Status
}

type ChannelReadOnlyResponse

type ChannelReadOnlyResponse struct {
	Status
	Channel struct {
		ID   string `json:"_id"`
		Name string `json:"name"`
		T    string `json:"t"`
		Msgs int    `json:"msgs"`
		U    struct {
			ID       string `json:"_id"`
			Username string `json:"username"`
		} `json:"u"`
		Ts               time.Time     `json:"ts"`
		Ro               bool          `json:"ro"`
		SysMes           bool          `json:"sysMes"`
		UpdatedAt        time.Time     `json:"_updatedAt"`
		Usernames        []string      `json:"usernames"`
		JoinCodeRequired bool          `json:"joinCodeRequired"`
		Muted            []interface{} `json:"muted"`
	} `json:"channel"`
}

type ChannelRemoveLeaderResponse

type ChannelRemoveLeaderResponse struct {
	Status
}

type ChannelRemoveModeratorResponse

type ChannelRemoveModeratorResponse struct {
	Status
}

type ChannelRemoveOwnerResponse

type ChannelRemoveOwnerResponse struct {
	Status
}

type ChannelRenameResponse

type ChannelRenameResponse struct {
	Status
	Channel struct {
		ID        string   `json:"_id"`
		Name      string   `json:"name"`
		T         string   `json:"t"`
		Usernames []string `json:"usernames"`
		Msgs      int      `json:"msgs"`
		U         struct {
			ID       string `json:"_id"`
			Username string `json:"username"`
		} `json:"u"`
		Ts        time.Time `json:"ts"`
		Ro        bool      `json:"ro"`
		SysMes    bool      `json:"sysMes"`
		UpdatedAt time.Time `json:"_updatedAt"`
	} `json:"channel"`
}

type ChannelResponse

type ChannelResponse struct {
	Status
	Channel models.Channel `json:"channel"`
}

type ChannelRolesResponse

type ChannelRolesResponse struct {
	Status
	Roles []struct {
		Rid string `json:"rid"`
		U   struct {
			ID       string `json:"_id"`
			Username string `json:"username"`
			Name     string `json:"name"`
		} `json:"u"`
		Roles []string `json:"roles"`
		ID    string   `json:"_id"`
	} `json:"roles"`
}

type ChannelTopicResponse

type ChannelTopicResponse struct {
	Status
	Topic string `json:"topic"`
}

type ChannelTypeResponse

type ChannelTypeResponse struct {
	Status
	Channel struct {
		ID   string `json:"_id"`
		Name string `json:"name"`
		T    string `json:"t"`
		Msgs int    `json:"msgs"`
		U    struct {
			ID       string `json:"_id"`
			Username string `json:"username"`
		} `json:"u"`
		Ts               time.Time     `json:"ts"`
		Ro               bool          `json:"ro"`
		SysMes           bool          `json:"sysMes"`
		UpdatedAt        time.Time     `json:"_updatedAt"`
		Usernames        []string      `json:"usernames"`
		JoinCodeRequired bool          `json:"joinCodeRequired"`
		Muted            []interface{} `json:"muted"`
	} `json:"channel"`
}

type ChannelUnArchiveResponse

type ChannelUnArchiveResponse struct {
	Status
}

type ChannelsResponse

type ChannelsResponse struct {
	Status
	models.Pagination
	Channels []models.Channel `json:"channels"`
}

type ChatDeleteResponse

type ChatDeleteResponse struct {
	Status
	ID string `json:"_id"`
	Ts int64  `json:"ts"`
}

type ChatFollowResponse

type ChatFollowResponse struct {
	Status
}

type ChatGetDeletedResponse

type ChatGetDeletedResponse struct {
	Status
	Messages []struct {
		ID string `json:"_id"`
	} `json:"messages"`
}

type ChatGetDiscussionResponse

type ChatGetDiscussionResponse struct {
	Status
	Messages []struct {
		ID  string    `json:"_id"`
		T   string    `json:"t"`
		Rid string    `json:"rid"`
		Ts  time.Time `json:"ts"`
		Msg string    `json:"msg"`
		U   struct {
			ID       string `json:"_id"`
			Username string `json:"username"`
		} `json:"u"`
		Groupable   bool          `json:"groupable"`
		Drid        string        `json:"drid"`
		Attachments []interface{} `json:"attachments"`
		UpdatedAt   time.Time     `json:"_updatedAt"`
	} `json:"messages"`
}

type ChatGetMentionedResponse

type ChatGetMentionedResponse struct {
	Status
	Messages []struct {
		ID  string    `json:"_id"`
		Rid string    `json:"rid"`
		Msg string    `json:"msg"`
		Ts  time.Time `json:"ts"`
		U   struct {
			ID       string `json:"_id"`
			Username string `json:"username"`
			Name     string `json:"name"`
		} `json:"u"`
		UpdatedAt time.Time `json:"_updatedAt"`
		Mentions  []struct {
			ID       string `json:"_id"`
			Name     string `json:"name"`
			Username string `json:"username"`
		} `json:"mentions"`
		Channels []interface{} `json:"channels"`
	} `json:"messages"`
}

type ChatGetMessageResponse

type ChatGetMessageResponse struct {
	Status
	models.CHATMessage `json:"message"`
}

type ChatGetPinResponse

type ChatGetPinResponse struct {
	Status
	Messages []struct {
		ID  string    `json:"_id"`
		Rid string    `json:"rid"`
		Msg string    `json:"msg"`
		Ts  time.Time `json:"ts"`
		U   struct {
			ID       string `json:"_id"`
			Username string `json:"username"`
			Name     string `json:"name"`
		} `json:"u"`
		Mentions  []interface{} `json:"mentions"`
		Channels  []interface{} `json:"channels"`
		UpdatedAt time.Time     `json:"_updatedAt"`
		Pinned    bool          `json:"pinned"`
		PinnedAt  time.Time     `json:"pinnedAt"`
		PinnedBy  struct {
			ID       string `json:"_id"`
			Username string `json:"username"`
		} `json:"pinnedBy"`
	} `json:"messages"`
	Count  int `json:"count"`
	Offset int `json:"offset"`
	Total  int `json:"total"`
}

type ChatGetReadReceiptsResponse

type ChatGetReadReceiptsResponse struct {
	Status
	Receipts []struct {
		ID        string    `json:"_id"`
		RoomID    string    `json:"roomId"`
		UserID    string    `json:"userId"`
		MessageID string    `json:"messageId"`
		Ts        time.Time `json:"ts"`
		User      struct {
			Username string `json:"username"`
			Name     string `json:"name"`
			ID       string `json:"_id"`
		} `json:"user"`
	} `json:"receipts"`
}

type ChatGetSnippetedResponse

type ChatGetSnippetedResponse struct {
	Status
	Messages []struct {
		ID  string    `json:"_id"`
		Rid string    `json:"rid"`
		Msg string    `json:"msg"`
		Ts  time.Time `json:"ts"`
		U   struct {
			ID       string `json:"_id"`
			Username string `json:"username"`
			Name     string `json:"name"`
		} `json:"u"`
		UpdatedAt   time.Time     `json:"_updatedAt"`
		Mentions    []interface{} `json:"mentions"`
		Channels    []interface{} `json:"channels"`
		SnippetName string        `json:"snippetName"`
		Snippeted   bool          `json:"snippeted"`
		SnippetedBy struct {
			ID       string `json:"_id"`
			Username string `json:"username"`
		} `json:"snippetedBy"`
	} `json:"messages"`
}

type ChatGetStarResponse

type ChatGetStarResponse struct {
	Status
	Messages []struct {
		ID  string    `json:"_id"`
		Rid string    `json:"rid"`
		Msg string    `json:"msg"`
		Ts  time.Time `json:"ts"`
		U   struct {
			ID       string `json:"_id"`
			Username string `json:"username"`
			Name     string `json:"name"`
		} `json:"u"`
		UpdatedAt time.Time     `json:"_updatedAt"`
		Mentions  []interface{} `json:"mentions"`
		Channels  []interface{} `json:"channels"`
		Starred   []struct {
			ID string `json:"_id"`
		} `json:"starred"`
	} `json:"messages"`
	Count  int `json:"count"`
	Offset int `json:"offset"`
	Total  int `json:"total"`
}

type ChatGetThreadResponse

type ChatGetThreadResponse struct {
	Status
	Messages []struct {
		ID  string    `json:"_id"`
		Rid string    `json:"rid"`
		Msg string    `json:"msg"`
		Ts  time.Time `json:"ts"`
		U   struct {
			ID       string `json:"_id"`
			Username string `json:"username"`
			Name     string `json:"name"`
		} `json:"u"`
		UpdatedAt time.Time     `json:"_updatedAt"`
		Mentions  []interface{} `json:"mentions"`
		Channels  []interface{} `json:"channels"`
		Replies   []string      `json:"replies,omitempty"`
		Tcount    int           `json:"tcount,omitempty"`
		Tlm       time.Time     `json:"tlm,omitempty"`
		Tmid      string        `json:"tmid,omitempty"`
	} `json:"messages"`
}

type ChatGetThreadsListResponse

type ChatGetThreadsListResponse struct {
	Status
	Threads []struct {
		ID  string    `json:"_id"`
		Rid string    `json:"rid"`
		Msg string    `json:"msg"`
		Ts  time.Time `json:"ts"`
		U   struct {
			ID       string `json:"_id"`
			Username string `json:"username"`
			Name     string `json:"name"`
		} `json:"u"`
		UpdatedAt time.Time     `json:"_updatedAt"`
		Mentions  []interface{} `json:"mentions"`
		Channels  []interface{} `json:"channels"`
		Replies   []string      `json:"replies"`
		Tcount    int           `json:"tcount"`
		Tlm       time.Time     `json:"tlm"`
	} `json:"threads"`
}

type ChatIgnoreResponse

type ChatIgnoreResponse struct {
	Status
}

type ChatPinResponse

type ChatPinResponse struct {
	Status
	Message struct {
		T   string    `json:"t"`
		Rid string    `json:"rid"`
		Ts  time.Time `json:"ts"`
		Msg string    `json:"msg"`
		U   struct {
			ID       string `json:"_id"`
			Username string `json:"username"`
		} `json:"u"`
		Groupable   bool `json:"groupable"`
		Attachments []struct {
			Text       string    `json:"text"`
			AuthorName string    `json:"author_name"`
			AuthorIcon string    `json:"author_icon"`
			Ts         time.Time `json:"ts"`
		} `json:"attachments"`
		UpdatedAt time.Time `json:"_updatedAt"`
		ID        string    `json:"_id"`
	} `json:"message"`
}

type ChatReactResponse

type ChatReactResponse struct {
	Status
}

type ChatReportResponse

type ChatReportResponse struct {
	Status
}

type ChatSearchResponse

type ChatSearchResponse struct {
	Status
	Messages []struct {
		ID  string    `json:"_id"`
		Rid string    `json:"rid"`
		Msg string    `json:"msg"`
		Ts  time.Time `json:"ts"`
		U   struct {
			ID       string `json:"_id"`
			Username string `json:"username"`
			Name     string `json:"name"`
		} `json:"u"`
		Mentions  []interface{} `json:"mentions"`
		Channels  []interface{} `json:"channels"`
		UpdatedAt time.Time     `json:"_updatedAt"`
		Score     float64       `json:"score"`
	} `json:"messages"`
}

type ChatSendMessageResponse

type ChatSendMessageResponse struct {
	Status
	Message struct {
		Rid string    `json:"rid"`
		Msg string    `json:"msg"`
		Ts  time.Time `json:"ts"`
		U   struct {
			ID       string `json:"_id"`
			Username string `json:"username"`
			Name     string `json:"name"`
		} `json:"u"`
		Unread    bool          `json:"unread"`
		Mentions  []interface{} `json:"mentions"`
		Channels  []interface{} `json:"channels"`
		UpdatedAt time.Time     `json:"_updatedAt"`
		ID        string        `json:"_id"`
	} `json:"message"`
}

type ChatStarResponse

type ChatStarResponse struct {
	Status
}

type ChatSyncThreadListResponse

type ChatSyncThreadListResponse struct {
	Status
	Threads struct {
		Update []struct {
			ID  string    `json:"_id"`
			Rid string    `json:"rid"`
			Msg string    `json:"msg"`
			Ts  time.Time `json:"ts"`
			U   struct {
				ID       string `json:"_id"`
				Username string `json:"username"`
				Name     string `json:"name"`
			} `json:"u"`
			UpdatedAt time.Time     `json:"_updatedAt"`
			Mentions  []interface{} `json:"mentions"`
			Channels  []interface{} `json:"channels"`
			Replies   []string      `json:"replies"`
			Tcount    int           `json:"tcount"`
			Tlm       time.Time     `json:"tlm"`
		} `json:"update"`
		Remove []struct {
			ID  string    `json:"_id"`
			Rid string    `json:"rid"`
			Msg string    `json:"msg"`
			Ts  time.Time `json:"ts"`
			U   struct {
				ID       string `json:"_id"`
				Username string `json:"username"`
				Name     string `json:"name"`
			} `json:"u"`
			UpdatedAt  time.Time     `json:"_updatedAt"`
			Mentions   []interface{} `json:"mentions"`
			Channels   []interface{} `json:"channels"`
			Replies    []string      `json:"replies"`
			Tcount     int           `json:"tcount"`
			Tlm        time.Time     `json:"tlm"`
			DeletedAt  time.Time     `json:"_deletedAt"`
			Collection string        `json:"__collection__"`
		} `json:"remove"`
	} `json:"threads"`
}

type ChatSyncThreadResponse

type ChatSyncThreadResponse struct {
	Status
	Messages struct {
		Update []struct {
			ID   string    `json:"_id"`
			Rid  string    `json:"rid"`
			Tmid string    `json:"tmid"`
			Msg  string    `json:"msg"`
			Ts   time.Time `json:"ts"`
			U    struct {
				ID       string `json:"_id"`
				Username string `json:"username"`
				Name     string `json:"name"`
			} `json:"u"`
			UpdatedAt time.Time     `json:"_updatedAt"`
			Mentions  []interface{} `json:"mentions"`
			Channels  []interface{} `json:"channels"`
		} `json:"update"`
		Remove []interface{} `json:"remove"`
	} `json:"messages"`
}

type ChatUnFollowResponse

type ChatUnFollowResponse struct {
	Status
}

type ChatUnPinResponse

type ChatUnPinResponse struct {
	Status
}

type ChatUnStarResponse

type ChatUnStarResponse struct {
	Status
}

type ChatUpdateEditedBy

type ChatUpdateEditedBy struct {
	ID       string `json:"_id"`
	Username string `json:"username"`
}

type ChatUpdateMessage

type ChatUpdateMessage struct {
	ID        string             `json:"_id"`
	Rid       string             `json:"rid"`
	Msg       string             `json:"msg"`
	Ts        time.Time          `json:"ts"`
	U         ChatUpdateU        `json:"u"`
	UpdatedAt time.Time          `json:"_updatedAt"`
	EditedAt  time.Time          `json:"editedAt"`
	EditedBy  ChatUpdateEditedBy `json:"editedBy"`
}

type ChatUpdateResponse

type ChatUpdateResponse struct {
	Status
	ChatUpdateMessage `json:"message"`
}

type ChatUpdateU

type ChatUpdateU struct {
	ID       string `json:"_id"`
	Username string `json:"username"`
}

type Client

type Client struct {
	Protocol string
	Host     string
	Path     string
	Port     string
	Version  string

	// Use this switch to see all network communication.
	Debug bool

	Auth *AuthInfo
}

func NewClient

func NewClient(serverUrl *url.URL, debug bool) *Client

func (*Client) AddUserToRole

func (c *Client) AddUserToRole(req *models.AddUserToRole) (*AddUserToRoleResponse, error)

func (*Client) AssetSet

func (c *Client) AssetSet(params map[string]io.Reader) (*AssetSetResponse, error)

func (*Client) AssetUnSet

func (c *Client) AssetUnSet(req *models.AssetUnSetRequest) (*AssetUnSetResponse, error)

func (*Client) AuthFacebookLogin

func (c *Client) AuthFacebookLogin(req *AuthFacebookLoginRequest) (*AuthLoginResponse, error)

func (*Client) AuthGoogleLogin

func (c *Client) AuthGoogleLogin(req *AuthGoogleLoginRequest) (*AuthLoginResponse, error)

func (*Client) AuthLogin

func (c *Client) AuthLogin(req AuthLoginRequest) (*AuthLoginResponse, error)

func (*Client) AuthLogout

func (c *Client) AuthLogout() (*AuthLogoutResponse, error)

func (*Client) AuthMe

func (c *Client) AuthMe() (*AuthMeResponse, error)

func (*Client) AuthTwitterLogin

func (c *Client) AuthTwitterLogin(req *AuthTwitterLoginRequest) (*AuthLoginResponse, error)

func (*Client) ChannelAddAll

func (c *Client) ChannelAddAll(req *models.ChannelAddAllRequest) (*ChannelAddAllResponse, error)

func (*Client) ChannelAddLeader

func (c *Client) ChannelAddLeader(req *models.ChannelAddLeaderRequest) (*ChannelAddLeaderResponse, error)

func (*Client) ChannelAddModerator

func (*Client) ChannelAddOwner

func (c *Client) ChannelAddOwner(req *models.ChannelAddOwnerRequest) (*ChannelAddOwnerResponse, error)

func (*Client) ChannelAnnouncement

func (*Client) ChannelAnonymousread

func (c *Client) ChannelAnonymousread(params url.Values) (*ChannelAnonymousreadResponse, error)

func (*Client) ChannelArchive

func (c *Client) ChannelArchive(req *models.ChannelArchiveRequest) (*ChannelArchiveResponse, error)

func (*Client) ChannelClose

func (c *Client) ChannelClose(req *models.ChannelCloseRequest) (*ChannelCloseResponse, error)

func (*Client) ChannelCounters

func (c *Client) ChannelCounters(params url.Values) (*ChannelCountersResponse, error)

func (*Client) ChannelCreate

func (c *Client) ChannelCreate(req *models.ChannelCreateRequest) (*ChannelCreateResponse, error)

func (*Client) ChannelCustomFields

func (*Client) ChannelDefault

func (c *Client) ChannelDefault(req *models.ChannelDefaultRequest) (*ChannelDefaultResponse, error)

func (*Client) ChannelDelete

func (c *Client) ChannelDelete(req *models.ChannelDeleteRequest) (*ChannelDeleteResponse, error)

func (*Client) ChannelDescription

func (*Client) ChannelFiles

func (c *Client) ChannelFiles(params url.Values) (*ChannelFilesResponse, error)

func (*Client) ChannelHistory

func (c *Client) ChannelHistory(params url.Values) (*ChannelHistoryResponse, error)

func (*Client) ChannelInvite

func (c *Client) ChannelInvite(req *models.ChannelInviteRequest) (*ChannelInviteResponse, error)

func (*Client) ChannelJoin

func (c *Client) ChannelJoin(req *models.ChannelJoinRequest) (*ChannelJoinResponse, error)

func (*Client) ChannelJoinCode

func (c *Client) ChannelJoinCode(req *models.ChannelJoinCodeRequest) (*ChannelJoinCodeResponse, error)

func (*Client) ChannelKick

func (c *Client) ChannelKick(req *models.ChannelKickRequest) (*ChannelKickResponse, error)

func (*Client) ChannelMembers

func (c *Client) ChannelMembers(params url.Values) (*ChannelMembersResponse, error)

func (*Client) ChannelMention

func (c *Client) ChannelMention(params url.Values) (*ChannelMentionResponse, error)

func (*Client) ChannelMessages

func (c *Client) ChannelMessages(params url.Values) (*ChannelMessagesResponse, error)

func (*Client) ChannelModerators

func (c *Client) ChannelModerators(params url.Values) (*ChannelModeratorsResponse, error)

func (*Client) ChannelOpen

func (c *Client) ChannelOpen(req *models.ChannelOpenRequest) (*ChannelOpenResponse, error)

func (*Client) ChannelReadOnly

func (c *Client) ChannelReadOnly(req *models.ChannelReadOnlyRequest) (*ChannelReadOnlyResponse, error)

func (*Client) ChannelRemoveLeader

func (*Client) ChannelRemoveOwner

func (*Client) ChannelRename

func (c *Client) ChannelRename(req *models.ChannelRenameRequest) (*ChannelRenameResponse, error)

func (*Client) ChannelRoles

func (c *Client) ChannelRoles(params url.Values) (*ChannelRolesResponse, error)

func (*Client) ChannelTopic

func (c *Client) ChannelTopic(req *models.ChannelTopicRequest) (*ChannelTopicResponse, error)

func (*Client) ChannelType

func (c *Client) ChannelType(req *models.ChannelTypeRequest) (*ChannelTypeResponse, error)

func (*Client) ChannelUnArchive

func (c *Client) ChannelUnArchive(req *models.ChannelUnArchiveRequest) (*ChannelUnArchiveResponse, error)

func (*Client) ChannelsList

func (c *Client) ChannelsList(params url.Values) (*ChannelsResponse, error)

GetPublicChannels returns all channels that can be seen by the logged in user.

https://rocket.chat/docs/developer-guides/rest-api/channels/list

func (*Client) ChatDelete

func (c *Client) ChatDelete(req *models.ChatDeleteRequest) (*ChatDeleteResponse, error)

func (*Client) ChatFollow

func (c *Client) ChatFollow(req *models.ChatFollowRequest) (*ChatFollowResponse, error)

func (*Client) ChatGetDeleted

func (c *Client) ChatGetDeleted(params url.Values) (*ChatGetDeletedResponse, error)

func (*Client) ChatGetDiscusssion

func (c *Client) ChatGetDiscusssion(params url.Values) (*ChatGetDiscussionResponse, error)

func (*Client) ChatGetMentioned

func (c *Client) ChatGetMentioned(params url.Values) (*ChatGetMentionedResponse, error)

func (*Client) ChatGetMessage

func (c *Client) ChatGetMessage(params url.Values) (*models.CHATMessage, error)

func (*Client) ChatGetPin

func (c *Client) ChatGetPin(params url.Values) (*ChatGetPinResponse, error)

func (*Client) ChatGetReadReceipts

func (c *Client) ChatGetReadReceipts(params url.Values) (*ChatGetReadReceiptsResponse, error)

func (*Client) ChatGetSnippeted

func (c *Client) ChatGetSnippeted(params url.Values) (*ChatGetSnippetedResponse, error)

func (*Client) ChatGetStar

func (c *Client) ChatGetStar(params url.Values) (*ChatGetStarResponse, error)

func (*Client) ChatGetThread

func (c *Client) ChatGetThread(params url.Values) (*ChatGetThreadResponse, error)

func (*Client) ChatGetThreadsList

func (c *Client) ChatGetThreadsList(params url.Values) (*ChatGetThreadsListResponse, error)

func (*Client) ChatIgnore

func (c *Client) ChatIgnore(params url.Values) (*ChatIgnoreResponse, error)

func (*Client) ChatPin

func (c *Client) ChatPin(req *models.ChatPinRequest) (*ChatPinResponse, error)

func (*Client) ChatReact

func (c *Client) ChatReact(req *models.ChatReactRequest) (*ChatReactResponse, error)

func (*Client) ChatReport

func (c *Client) ChatReport(req *models.ChatReportRequest) (*ChatReportResponse, error)

func (*Client) ChatSearch

func (c *Client) ChatSearch(params url.Values) (*ChatSearchResponse, error)

func (*Client) ChatSendMessage

func (c *Client) ChatSendMessage(req *models.ChatSendMessageRequest) (*ChatSendMessageResponse, error)

func (*Client) ChatStar

func (c *Client) ChatStar(req *models.ChatStarRequest) (*ChatStarResponse, error)

func (*Client) ChatSyncThread

func (c *Client) ChatSyncThread(params url.Values) (*ChatSyncThreadResponse, error)

func (*Client) ChatSyncThreadList

func (c *Client) ChatSyncThreadList(params url.Values) (*ChatSyncThreadListResponse, error)

func (*Client) ChatUnFollow

func (c *Client) ChatUnFollow(req *models.ChatUnFollowRequest) (*ChatUnFollowResponse, error)

func (*Client) ChatUnPin

func (c *Client) ChatUnPin(req *models.ChatUnPinRequest) (*ChatUnPinResponse, error)

func (*Client) ChatUnStar

func (c *Client) ChatUnStar(req *models.ChatUnStarRequest) (*ChatUnStarResponse, error)

func (*Client) ChatUpdate

func (c *Client) ChatUpdate(req *models.ChatUpdateRequest) (*ChatUpdateResponse, error)

func (*Client) CloseIM

func (c *Client) CloseIM(req *models.CloseIMRequest) (*CloseIMResponse, error)

func (*Client) CommandGet

func (c *Client) CommandGet(params url.Values) (*CommandGetResponse, error)

func (*Client) CommandList

func (c *Client) CommandList(params url.Values) (*CommandListResponse, error)

func (*Client) CommandPreviewGet

func (c *Client) CommandPreviewGet(params url.Values)

func (*Client) CommandPreviewPost

func (c *Client) CommandPreviewPost(req *CommandPreviewPostRequest)

func (*Client) CommandRun

func (c *Client) CommandRun(req *CommandRunRequest) (*CommandRunResponse, error)

func (*Client) CountersIM

func (c *Client) CountersIM(params url.Values) (*models.CountersIMMessage, error)

func (*Client) CreateDiscussion

func (c *Client) CreateDiscussion(discussionName string, room *models.Room) error

func (*Client) CreateGroup

func (c *Client) CreateGroup(req *models.CreateGroupRequest) (*CreateGroupResponse, error)

func (*Client) CreateIM

func (c *Client) CreateIM(req *models.CreateIMRequest) (*CreateIMResponse, error)

func (*Client) CreateIntegration

func (c *Client) CreateIntegration(req *models.CreateIntegration) (*CreateIntegrationResponse, error)

func (*Client) CreateInvite

func (c *Client) CreateInvite(req *models.CreateInviteRequest) (*CreateInviteResponse, error)

func (*Client) CreateRole

func (c *Client) CreateRole(req *models.Role) (*CreateRoleResponse, error)

func (*Client) CreateToken

func (c *Client) CreateToken(userID, username string) (*models.UserCredentials, error)

CreateToken creates an access token for a user

https://rocket.chat/docs/developer-guides/rest-api/users/createtoken/

func (*Client) CreateUser

func (c *Client) CreateUser(req *models.CreateUserRequest) (*CreateUserResponse, error)

CreateUser being logged in with a user that has permission to do so.

https://rocket.chat/docs/developer-guides/rest-api/users/create

func (*Client) CustomSound

func (c *Client) CustomSound() (*CustomSoundResponse, error)

func (*Client) CustomUserStatus

func (c *Client) CustomUserStatus() (*CustomUserStatusResponse, error)

func (*Client) Delete

func (c *Client) Delete(api string, body io.Reader, response Response) error

func (*Client) EmojiCreate

func (c *Client) EmojiCreate(params map[string]io.Reader) (*EmojiCreateResponse, error)

func (*Client) EmojiDelete

func (c *Client) EmojiDelete(req *models.EmojiDeleteRequest) (*EmojiDeleteResponse, error)

func (*Client) EmojiList

func (c *Client) EmojiList(params url.Values) (*EmojiListResponse, error)

func (*Client) EmojiUpdate

func (c *Client) EmojiUpdate(params map[string]io.Reader) (*EmojiUpdateResponse, error)

func (*Client) EveryoneListIM

func (c *Client) EveryoneListIM() (*EveryoneListIMResponse, error)

func (*Client) FavoriteRoom

func (c *Client) FavoriteRoom(room *models.Room) error

func (*Client) FilesIM

func (c *Client) FilesIM(params url.Values) (*FileIMResponse, error)

func (*Client) ForgotPassword

func (c *Client) ForgotPassword(req *models.ForgotPassword) (*ForgotPasswordResponse, error)

func (*Client) Get

func (c *Client) Get(api string, params url.Values, response Response) error

Get call Get

func (*Client) GetChannelInfo

func (c *Client) GetChannelInfo(channel *models.Channel) (*models.Channel, error)

GetChannelInfo get information about a channel. That might be useful to update the usernames.

https://rocket.chat/docs/developer-guides/rest-api/channels/info

func (*Client) GetDirectory

func (c *Client) GetDirectory(params url.Values) (*models.Directory, error)

GetDirectory a method, that searches by users or channels on all users and channels available on server. It supports the Offset, Count, and Sort Query Parameters along with Query and Fields Query Parameters.

https://rocket.chat/docs/developer-guides/rest-api/miscellaneous/directory

func (*Client) GetDiscussion

func (c *Client) GetDiscussion(params url.Values) (*GetRoomDiscussionResponse, error)

func (*Client) GetIntegration

func (c *Client) GetIntegration(params url.Values) (*GetIntegrationResponse, error)

func (*Client) GetJoinedChannels

func (c *Client) GetJoinedChannels(params url.Values) (*ChannelsResponse, error)

GetJoinedChannels returns all channels that the user has joined.

https://rocket.chat/docs/developer-guides/rest-api/channels/list-joined

func (*Client) GetMessages

func (c *Client) GetMessages(channel *models.Channel, page *models.Pagination) ([]models.Message, error)

Get messages from a channel. The channel id has to be not nil. Optionally a count can be specified to limit the size of the returned messages.

https://rocket.chat/docs/developer-guides/rest-api/channels/history

func (*Client) GetOauthApp

func (c *Client) GetOauthApp(params url.Values) (*OauthAppGetResponse, error)

func (*Client) GetOne

func (c *Client) GetOne(params url.Values) (*GetOneResponse, error)

func (*Client) GetOnlineChannels

func (c *Client) GetOnlineChannels(params url.Values) (*OnlineChannelResponse, error)

func (*Client) GetPersonalAccessTokens

func (c *Client) GetPersonalAccessTokens() (*GetPersonalAccessTokensResponse, error)

func (*Client) GetPreferences

func (c *Client) GetPreferences() (*GetPreferencesResponse, error)

func (*Client) GetPresence

func (c *Client) GetPresence(params url.Values) (*UserPresenceResponse, error)

func (*Client) GetRoom

func (c *Client) GetRoom(params url.Values) (*GetRoomResponse, error)

func (*Client) GetServerInfo

func (c *Client) GetServerInfo() (*models.Info, error)

GetServerInfo a simple method, requires no authentication, that returns information about the server including version information.

https://rocket.chat/docs/developer-guides/rest-api/miscellaneous/info

func (*Client) GetSpotlight

func (c *Client) GetSpotlight(params url.Values) (*models.Spotlight, error)

GetSpotlight searches for users or rooms that are visible to the user. WARNING: It will only return rooms that user didn’t join yet.

https://rocket.chat/docs/developer-guides/rest-api/miscellaneous/spotlight

func (*Client) GetStatistics

func (c *Client) GetStatistics() (*models.StatisticsInfo, error)

GetStatistics Statistics about the Rocket.Chat server.

https://rocket.chat/docs/developer-guides/rest-api/miscellaneous/statistics

func (*Client) GetStatisticsList

func (c *Client) GetStatisticsList(params url.Values) (*models.StatisticsList, error)

GetStatisticsList Selectable statistics about the Rocket.Chat server. It supports the Offset, Count and Sort Query Parameters along with just the Fields and Query Parameters.

https://rocket.chat/docs/developer-guides/rest-api/miscellaneous/statistics.list

func (*Client) GetStatus

func (c *Client) GetStatus(params url.Values) (*GetStatusResponse, error)

func (*Client) GetSubscriptions

func (c *Client) GetSubscriptions(params url.Values) (*GetSubscriptionsResponse, error)

func (*Client) GetUsernameSuggestion

func (c *Client) GetUsernameSuggestion() (*GetUsernameSuggestionResponse, error)

func (*Client) GetUsersInRole

func (c *Client) GetUsersInRole(params url.Values) (*GetUsersInRoleResponse, error)

func (*Client) GroupAddAll

func (c *Client) GroupAddAll(req *models.GroupAddAllRequest) (*GroupAddAllResponse, error)

func (*Client) GroupAddLeader

func (c *Client) GroupAddLeader(req *models.GroupAddLeaderRequest) (*GroupAddLeaderResponse, error)

func (*Client) GroupAddModerator

func (c *Client) GroupAddModerator(req *models.GroupAddModeratorRequest) (*GroupAddModeratorResponse, error)

func (*Client) GroupAddOwner

func (c *Client) GroupAddOwner(req *models.GroupAddOwnerRequest) (*GroupAddOwnerResponse, error)

func (*Client) GroupAnnouncement

func (c *Client) GroupAnnouncement(req *models.GroupAnnouncementRequest) (*GroupAnnouncementResponse, error)

func (*Client) GroupArchive

func (c *Client) GroupArchive(req *models.GroupArchiveRequest) (*GroupArchiveResponse, error)

func (*Client) GroupClose

func (c *Client) GroupClose(req *models.GroupCloseRequest) (*GroupCloseResponse, error)

func (*Client) GroupCounters

func (c *Client) GroupCounters(params url.Values) (*GroupCountersResponse, error)

func (*Client) GroupCustomFields

func (c *Client) GroupCustomFields(req *models.GroupCustomFieldsRequest) (*GroupCustomFieldsResponse, error)

func (*Client) GroupDelete

func (c *Client) GroupDelete(req *models.GroupDeleteRequest) (*GroupDeleteResponse, error)

func (*Client) GroupDescription

func (c *Client) GroupDescription(req *models.GroupDescriptionRequest) (*GroupDescriptionResponse, error)

func (*Client) GroupFiles

func (c *Client) GroupFiles(params url.Values) (*GroupFilesResponse, error)

func (*Client) GroupHistory

func (c *Client) GroupHistory(params url.Values) (*GroupHistoryResponse, error)

func (*Client) GroupInfo

func (c *Client) GroupInfo(params url.Values) (*GroupInfoResponse, error)

func (*Client) GroupInvite

func (c *Client) GroupInvite(req *models.GroupInviteRequest) (*GroupInviteResponse, error)

func (*Client) GroupKick

func (c *Client) GroupKick(req *models.GroupKickRequest) (*GroupKickResponse, error)

func (*Client) GroupLeave

func (c *Client) GroupLeave(req *models.GroupLeaveRequest) (*GroupLeaveResponse, error)

func (*Client) GroupList

func (c *Client) GroupList(params url.Values) (*GroupListResponse, error)

func (*Client) GroupListAll

func (c *Client) GroupListAll(params url.Values) (*GroupListAllResponse, error)

func (*Client) GroupMembers

func (c *Client) GroupMembers(params url.Values) (*GroupMembersResponse, error)

func (*Client) GroupMessages

func (c *Client) GroupMessages(params url.Values) (*GroupMessagesResponse, error)

func (*Client) GroupModerators

func (c *Client) GroupModerators(params url.Values) (*GroupModeratorsResponse, error)

func (*Client) GroupOnline

func (c *Client) GroupOnline(params url.Values) (*GroupOnlineResponse, error)

func (*Client) GroupOpen

func (c *Client) GroupOpen(req *models.GroupOpenRequest) (*GroupOpenResponse, error)

func (*Client) GroupReadOnly

func (c *Client) GroupReadOnly(req *models.GroupReadOnlyRequest) (*GroupReadOnlyResponse, error)

func (*Client) GroupRemoveLeader

func (c *Client) GroupRemoveLeader(req *models.GroupRemoveLeaderRequest) (*GroupRemoveLeaderResponse, error)

func (*Client) GroupRemoveModerator

func (*Client) GroupRemoveOwner

func (c *Client) GroupRemoveOwner(req *models.GroupRemoveOwnerRequest) (*GroupRemoveOwnerResponse, error)

func (*Client) GroupRename

func (c *Client) GroupRename(req *models.GroupRenameRequest) (*GroupRenameResponse, error)

func (*Client) GroupRoles

func (c *Client) GroupRoles(params url.Values) (*GroupRolesResponse, error)

func (*Client) GroupTopic

func (c *Client) GroupTopic(req *models.GroupTopicRequest) (*GroupTopicResponse, error)

func (*Client) GroupType

func (c *Client) GroupType(req *models.GroupTypeRequest) (*GroupTypeResponse, error)

func (*Client) GroupUnArchive

func (c *Client) GroupUnArchive(req *models.GroupUnArchiveRequest) (*GroupUnArchiveResponse, error)

func (*Client) HistoryIM

func (c *Client) HistoryIM(params url.Values) (*HistoryIMResponse, error)

func (*Client) HistoryIntegration

func (c *Client) HistoryIntegration(params url.Values) (*HistoryIntegrationResponse, error)

func (*Client) LeaveChannel

func (c *Client) LeaveChannel(channel *models.Channel) error

LeaveChannel leaves a channel. The id of the channel has to be not nil.

https://rocket.chat/docs/developer-guides/rest-api/channels/leave

func (*Client) LeaveRoom

func (c *Client) LeaveRoom(room *models.Room) error

func (*Client) ListAll

func (c *Client) ListAll(params url.Values) (*ListAllResponse, error)

func (*Client) ListIM

func (c *Client) ListIM() (*ListIMResponse, error)

func (*Client) ListIntegration

func (c *Client) ListIntegration() (*ListIntegrationResponse, error)

func (*Client) ListInvites

func (c *Client) ListInvites() (*ListInvitesResponse, error)

func (*Client) ListOauthApp

func (c *Client) ListOauthApp() (*OauthAppListResponse, error)

func (*Client) LivechatAgentDepartments

func (c *Client) LivechatAgentDepartments(params url.Values) (*AgentDepartmentResponse, error)

func (*Client) LivechatAgentInfo

func (c *Client) LivechatAgentInfo(req *models.AgentInfoRequest) (*AgentInfoResponse, error)

func (*Client) LivechatAgentNext

func (c *Client) LivechatAgentNext(req *models.AgentInfoRequest) (*AgentInfoResponse, error)

func (*Client) LivechatAppearance

func (c *Client) LivechatAppearance() (*AppearanceResponse, error)

func (*Client) LivechatConfig

func (c *Client) LivechatConfig(params url.Values) (*LiveChatConfigResponse, error)

func (*Client) LivechatCustomField

func (c *Client) LivechatCustomField(req *LiveChatCustomFieldRequest) (*LiveChatCustomFieldResponse, error)

func (*Client) LivechatCustomFields

func (c *Client) LivechatCustomFields(req *LiveChatCustomFieldsRequest) (*LiveChatCustomFieldsResponse, error)

func (*Client) LivechatCustom_Field

func (c *Client) LivechatCustom_Field(params url.Values) (*LiveChatCustom_FieldResponse, error)

func (*Client) LivechatCustom_Fields

func (c *Client) LivechatCustom_Fields(params url.Values) (*LiveChatCustom_FieldsResponse, error)

func (*Client) LivechatDeleteDepartmentGet

func (c *Client) LivechatDeleteDepartmentGet(params url.Values) (*LiveChatRemoveDepartmentResponse, error)

func (*Client) LivechatDepartment

func (c *Client) LivechatDepartment() (*LiveChatDepartmentsResponse, error)

func (*Client) LivechatGetInfoUser

func (c *Client) LivechatGetInfoUser(params url.Values) (*LiveChatGetInfoUserResponse, error)

func (*Client) LivechatGetOneInquiry

func (c *Client) LivechatGetOneInquiry(params url.Values) (*LiveChatGetOneInquiriesResponse, error)

func (*Client) LivechatGetUsers

func (c *Client) LivechatGetUsers(params url.Values) (*LiveChatGetUsersResponse, error)

func (*Client) LivechatIntegrationSetting

func (c *Client) LivechatIntegrationSetting() (*LiveChatIntegraionSettingResponse, error)

func (*Client) LivechatListInquiries

func (c *Client) LivechatListInquiries(params url.Values) (*LiveChatListInquiriesResponse, error)

func (*Client) LivechatLoadHistory

func (c *Client) LivechatLoadHistory(params url.Values) (*LiveChatLoadHistoryResponse, error)

func (*Client) LivechatMessage

func (c *Client) LivechatMessage(req *LiveChatMessageRequest) (*LiveChatMessageResponse, error)

func (*Client) LivechatOfficeHour

func (c *Client) LivechatOfficeHour() (*LiveChatOfficeHourResponse, error)

func (*Client) LivechatOfflineSend

func (c *Client) LivechatOfflineSend(req *LiveChatOfflineSendRequest) (*LiveChatOfflineSendResponse, error)

func (*Client) LivechatQueryDepartmentGet

func (c *Client) LivechatQueryDepartmentGet(params url.Values) (*LiveChatQueryDepartmentResponse, error)

Get info about a department

func (*Client) LivechatQueue

func (c *Client) LivechatQueue(params url.Values) (*LiveChatQueueResponse, error)

func (*Client) LivechatRegisterUser

func (c *Client) LivechatRegisterUser(params url.Values, req *LiveChatRegisterUserRequset) (*LiveChatRegisterUserResponse, error)

func (*Client) LivechatRegisterVisitor

func (c *Client) LivechatRegisterVisitor(req *LiveChatVisitorRegisterRequest) (*LiveChatVisitorRegisterResponse, error)

func (*Client) LivechatRemoveMessage

func (c *Client) LivechatRemoveMessage(params url.Values, req *LiveChatDeleteMessageRequest) (*LiveChatDeleteMessageResponse, error)

func (*Client) LivechatRemoveUser

func (c *Client) LivechatRemoveUser(params url.Values) (*LiveChatRemoveUserResponse, error)

func (*Client) LivechatRetrieveVisitor

func (c *Client) LivechatRetrieveVisitor(params url.Values) (*LiveChatVisitorRetrieveResponse, error)

func (*Client) LivechatRoom

func (c *Client) LivechatRoom(params url.Values) (*LiveChatRoomResponse, error)

func (*Client) LivechatRoomClose

func (c *Client) LivechatRoomClose(req *LiveChatRoomCloseRequest) (*LiveChatRoomCloseResponse, error)

func (*Client) LivechatRoomForward

func (c *Client) LivechatRoomForward(req *LiveChatRoomForwardRequest) (*LiveChatRoomForwardResponse, error)

func (*Client) LivechatRoomSurvey

func (c *Client) LivechatRoomSurvey(req *LiveChatRoomSurveyRequest) (*LiveChatRoomSurveyResponse, error)

func (*Client) LivechatRoomTransfer

func (c *Client) LivechatRoomTransfer(req *LiveChatRoomTransferRequest) (*LiveChatRoomTransferResponse, error)

func (*Client) LivechatRooms

func (c *Client) LivechatRooms(params url.Values) (*LiveChatRoomsResponse, error)

func (*Client) LivechatTakeInquiries

func (c *Client) LivechatTakeInquiries(req *LiveChatTakeInquiriesRequest) (*LiveChatTakeInquiriesResponse, error)

func (*Client) LivechatTranscript

func (c *Client) LivechatTranscript(req *LiveChatTranscriptRequest) (*LiveChatTranscriptResponse, error)

func (*Client) LivechatTrigger

func (c *Client) LivechatTrigger(params url.Values) (*LiveChatTriggerResponse, error)

func (*Client) LivechatTriggers

func (c *Client) LivechatTriggers() (*LiveChatTriggersResponse, error)

func (*Client) LivechatUpdateDepartment

func (c *Client) LivechatUpdateDepartment(params url.Values, req *LiveChatUpdateDepartmentRequest) (*LiveChatUpdateDepartmentResponse, error)

func (*Client) LivechatUpdateMessage

func (c *Client) LivechatUpdateMessage(params url.Values, req *LiveChatUpdateMessageRequest) (*LiveChatUpdateMessageResponse, error)

func (*Client) LivechatVideoCall

func (c *Client) LivechatVideoCall(params url.Values) (*LiveChatVideoCallResponse, error)

func (*Client) LivechatVisitorChatHistory

func (c *Client) LivechatVisitorChatHistory(params url.Values) (*LiveChatVisitorChatHistoryResponse, error)

func (*Client) LivechatVisitorInfo

func (c *Client) LivechatVisitorInfo(params url.Values) (*LiveChatVisitorInfoResponse, error)

func (*Client) LivechatVisitorPageHistory

func (c *Client) LivechatVisitorPageHistory(params url.Values) (*LiveChatVisitorNavigationHistoryRetrieveResponse, error)

func (*Client) LivechatVisitorSearch

func (c *Client) LivechatVisitorSearch(params url.Values) (*LiveChatVisitorSearchResponse, error)

func (*Client) Login

func (c *Client) Login(credentials *models.UserCredentials) (*LogonResponse, error)

Login a user. The Email and the Password are mandatory. The auth token of the user is stored in the Client instance.

https://rocket.chat/docs/developer-guides/rest-api/authentication/login

func (*Client) Logout

func (c *Client) Logout() (string, error)

Logout a user. The function returns the response message of the server.

https://rocket.chat/docs/developer-guides/rest-api/authentication/logout

func (*Client) MembersIM

func (c *Client) MembersIM(params url.Values) (*MemberIMResponse, error)

func (*Client) MessagesIM

func (c *Client) MessagesIM(params url.Values) (*MessageIMResponse, error)

func (*Client) OpenIM

func (c *Client) OpenIM(req *OpenIM) (*OpenIMResponse, error)

func (*Client) OtherMessagesIM

func (c *Client) OtherMessagesIM(params url.Values) (*OtherMessageIMResponse, error)

func (*Client) Post

func (c *Client) Post(api string, body io.Reader, response Response) error

Post call as JSON

func (*Client) PostForm

func (c *Client) PostForm(api string, params url.Values, response Response) error

PostForm call as Form Data

func (*Client) PostFormData

func (c *Client) PostFormData(method, api string, params map[string]io.Reader, response Response) error

func (*Client) PostMessage

func (c *Client) PostMessage(msg *models.PostMessage) (*MessageResponse, error)

PostMessage send a message to a channel. The channel or roomId has to be not nil. The message will be json encode.

https://rocket.chat/docs/developer-guides/rest-api/chat/postmessage

func (*Client) Presence

func (c *Client) Presence(params url.Values) (*PresenceResponse, error)

func (*Client) PrivateSettings

func (c *Client) PrivateSettings() (*SettingsResponse, error)

func (*Client) PublicSettings

func (c *Client) PublicSettings(params url.Values) (*SettingsResponse, error)

func (*Client) PushTokenDelete

func (c *Client) PushTokenDelete(req *PushTokenDeleteRequest) (*PushTokenDeleteResponse, error)

func (*Client) PushTokenPost

func (c *Client) PushTokenPost(req *PushTokenPostRequest) (*PushTokenPostResponse, error)

func (*Client) Put

func (c *Client) Put(api string, body io.Reader, response Response) error

func (*Client) Read

func (c *Client) Read(req *models.Read) (*ReadResp, error)

func (*Client) RegisterUser

func (c *Client) RegisterUser(req *models.RegisterUserRequest) (*RegisterUserResponse, error)

func (*Client) RemoveIntegration

func (c *Client) RemoveIntegration(req *RemoveIntegrationRequset) (*RemoveIntegrationResponse, error)

func (*Client) RemoveInvite

func (c *Client) RemoveInvite(req *RemoveInviteRequest) (RemoveInviteResponse, error)

func (*Client) RequestDataDownload

func (c *Client) RequestDataDownload(params url.Values) (*RequestDataDownloadResponse, error)

func (*Client) RolesList

func (c *Client) RolesList() (*RolesListResponse, error)

func (*Client) RolesSync

func (c *Client) RolesSync(params url.Values) (*RolesSyncResponse, error)

func (*Client) RoomAdminRoom

func (c *Client) RoomAdminRoom(params url.Values) (*RoomAdminRoomResponse, error)

func (*Client) RoomCleanHistory

func (c *Client) RoomCleanHistory(req *models.RoomCleanHistoryRequest) (*RoomCleanHistoryResponse, error)

func (*Client) RoomInfo

func (c *Client) RoomInfo(params url.Values) (*GetRoomInfoResponse, error)

func (*Client) SaveNotification

func (c *Client) SaveNotification(room *models.Room, notification *models.Notifications) error

func (*Client) Send

func (c *Client) Send(channel *models.Channel, msg string) error

Sends a message to a channel. The name of the channel has to be not nil. The message will be html escaped.

https://rocket.chat/docs/developer-guides/rest-api/chat/postmessage

func (*Client) SetActiveStatus

func (c *Client) SetActiveStatus(req *models.SetActiveStatus) (*SetActiveStatusResponse, error)

func (*Client) SetPreferrences

func (c *Client) SetPreferrences(req *models.SetPreferrences) (*SetPreferencesResponse, error)

func (*Client) SetStatus

func (c *Client) SetStatus(req *models.SetStatus) (*SetStatusResponse, error)

func (*Client) SetTopicIM

func (c *Client) SetTopicIM(req *SetTopic) (*SetTopicIMResponse, error)

func (*Client) SetUserAvatar

func (c *Client) SetUserAvatar(userID, username, avatarURL string) (*Status, error)

SetUserAvatar updates a user's avatar being logged in with a user that has permission to do so. Currently only passing an URL is possible.

https://rocket.chat/docs/developer-guides/rest-api/users/setavatar/

func (*Client) Settings

func (c *Client) Settings(id string) (*SettingsMessageResponse, error)

func (*Client) SettingsConfigurations

func (c *Client) SettingsConfigurations() (*SettingsConfigurations, error)

func (*Client) SettingsOauth

func (c *Client) SettingsOauth() (*SettingsOauthResponse, error)

func (*Client) SettingsUpdate

func (c *Client) SettingsUpdate(params url.Values) (*SettingsUpdateResonse, error)

func (*Client) UnRead

func (c *Client) UnRead(req *models.UnRead) (*UnReadResp, error)

func (*Client) UpdateOwnBasicInfo

func (c *Client) UpdateOwnBasicInfo(req *models.UpdateOwnBasicInfo) (*Status, error)

func (*Client) UpdateUser

func (c *Client) UpdateUser(req *models.UpdateUserRequest) (*CreateUserResponse, error)

UpdateUser updates a user's data being logged in with a user that has permission to do so.

https://rocket.chat/docs/developer-guides/rest-api/users/update/

func (*Client) Upload

func (c *Client) Upload(params map[string]io.Reader, room *models.Room) (*UploadResponse, error)

func (*Client) UserDeactivateIdle

func (*Client) UserDelete

func (c *Client) UserDelete(req *models.UserDeleteRequest) (*UserDeleteResponse, error)

func (*Client) UserDeleteOwn

func (c *Client) UserDeleteOwn(req *models.UserDeleteOwnRequest) (*UserDeleteOwnResponse, error)

func (*Client) UserGetAvatar

func (c *Client) UserGetAvatar(params url.Values) (*UserGetAvatarResponse, error)

func (*Client) UserInfo

func (c *Client) UserInfo(params url.Values) (*UsersInfoResponse, error)

func (*Client) UserInviteToken

func (c *Client) UserInviteToken(req *UserInviteToken) (*UserInviteTokenResponse, error)

func (*Client) UserResetAvatar

func (c *Client) UserResetAvatar(req *models.UserResetAvatarRequest) (*UserResetAvatarResponse, error)

func (*Client) UsersList

func (c *Client) UsersList(params url.Values) (*UsersListResponse, error)

func (*Client) ValidateInviteToken

func (c *Client) ValidateInviteToken(req *UserInviteToken) (*ValidateInviteTokenResponse, error)

func (*Client) VedieUpdateTimeout

func (*Client) WebdavGetAccount

func (c *Client) WebdavGetAccount(params url.Values) (*WebdavGetAccountResponse, error)

type CloseIMResponse

type CloseIMResponse struct {
	Status
}

type CommandGetResponse

type CommandGetResponse struct {
	Command models.Command
	Status
}

type CommandListResponse

type CommandListResponse struct {
	Commands []models.Command
	Status
}

type CommandPreviewGetReqeuset

type CommandPreviewGetReqeuset struct {
	Command string `json:"command"`
	RoomId  string `json:"roomId"`
	Params  string `json:"params"`
}

type CommandPreviewPostRequest

type CommandPreviewPostRequest struct {
	Command     string `json:"command"`
	RoomId      string `json:"roomId"`
	TmId        string `json:"tmid"`
	Params      string `json:"params"`
	TriggerId   string `json:"triggerId"`
	PreviewItem struct {
		Id    string `json:"id"`
		Type  string `json:"type"`
		Value string `json:"value"`
	} `json:"previewItem"`
}

type CommandRunRequest

type CommandRunRequest struct {
	Command   string `json:"command"`
	RoomID    string `json:"roomId"`
	Params    string `json:"params,omitempty"`
	Tmid      string `json:"tmid,omitempty"`
	TriggerID string `json:"triggerId,omitempty"`
}

type CommandRunResponse

type CommandRunResponse struct {
	Status
}

type CountersIMResponse

type CountersIMResponse struct {
	Status
	models.CountersIMMessage
}

type CreateGroupResponse

type CreateGroupResponse struct {
	Status
	Group struct {
		ID        string            `json:"_id"`
		Name      string            `json:"name"`
		T         string            `json:"t"`
		UserNames map[string]string `json:"usernames"`
		Msgs      int               `json:"msgs"`
		U         map[string]string `json:"u"`
		Ts        time.Time         `json:"ts"`
		Ro        bool              `json:"ro"`
		SysMes    bool              `json:"sysMes"`
		UpdateAt  time.Time         `json:"_updatedAt"`
	} `json:"group"`
}

type CreateIMResponse

type CreateIMResponse struct {
	Status
	Room struct {
		Rid       string   `json:"rid"`
		T         string   `json:"t"`
		Usernames []string `json:"usernames"`
		ID        string   `json:"_id"`
	} `json:"room"`
}

type CreateIntegrationResponse

type CreateIntegrationResponse struct {
	Status
	Integration struct {
		Type          string        `json:"type"`
		Name          string        `json:"name"`
		Enabled       bool          `json:"enabled"`
		Username      string        `json:"username"`
		Event         string        `json:"event"`
		Urls          []string      `json:"urls"`
		ScriptEnabled bool          `json:"scriptEnabled"`
		UserID        string        `json:"userId"`
		Channel       []interface{} `json:"channel"`
		CreatedAt     time.Time     `json:"_createdAt"`
		CreatedBy     struct {
			Username string `json:"username"`
			ID       string `json:"_id"`
		} `json:"_createdBy"`
		UpdatedAt time.Time `json:"_updatedAt"`
		ID        string    `json:"_id"`
	} `json:"integration"`
}

type CreateInviteResponse

type CreateInviteResponse struct {
	Status
	models.Invite
}

type CreateRoleResponse

type CreateRoleResponse struct {
	Status
	Role struct {
		ID          string    `json:"_id"`
		Name        string    `json:"name"`
		Scope       string    `json:"scope"`
		Description string    `json:"description"`
		UpdatedAt   time.Time `json:"_updatedAt"`
	} `json:"role"`
}

type CreateRoomResponse

type CreateRoomResponse struct {
	Status
}

type CreateUserResponse

type CreateUserResponse struct {
	Status
	User struct {
		ID        string    `json:"_id"`
		CreatedAt time.Time `json:"createdAt"`
		Services  struct {
			Password struct {
				Bcrypt string `json:"bcrypt"`
			} `json:"password"`
		} `json:"services"`
		Username string `json:"username"`
		Emails   []struct {
			Address  string `json:"address"`
			Verified bool   `json:"verified"`
		} `json:"emails"`
		Type         string            `json:"type"`
		Status       string            `json:"status"`
		Active       bool              `json:"active"`
		Roles        []string          `json:"roles"`
		UpdatedAt    time.Time         `json:"_updatedAt"`
		Name         string            `json:"name"`
		CustomFields map[string]string `json:"customFields"`
	} `json:"user"`
}

type CustomFields

type CustomFields struct {
	Key       string `json:"key"`
	Value     string `json:"value"`
	Overwrite bool   `json:"overwrite"`
}

type CustomSoundResponse

type CustomSoundResponse struct {
	Sounds []models.Sound `json:"sounds"`
	// contains filtered or unexported fields
}

type CustomUserStatusResponse

type CustomUserStatusResponse struct {
	Status []models.CustomUserStatus `json:"statuses"`
	// contains filtered or unexported fields
}

type Data

type Data struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type DirectoryResponse

type DirectoryResponse struct {
	Status
	models.Directory
}

type EmojiCreateResponse

type EmojiCreateResponse struct {
	Status
}

type EmojiDeleteResponse

type EmojiDeleteResponse struct {
	Status
}

type EmojiListResponse

type EmojiListResponse struct {
	Status
	Emojis struct {
		Update []struct {
			ID        string        `json:"_id"`
			Name      string        `json:"name"`
			Aliases   []interface{} `json:"aliases"`
			Extension string        `json:"extension"`
			UpdatedAt time.Time     `json:"_updatedAt"`
		} `json:"update"`
		Remove []interface{} `json:"remove"`
	} `json:"emojis"`
}

type EmojiUpdateResponse

type EmojiUpdateResponse struct {
	Status
}

type EveryoneListIMResponse

type EveryoneListIMResponse struct {
	Ims []models.EveryoneListIM
	// contains filtered or unexported fields
}

type FavoriteResponse

type FavoriteResponse struct {
	Status
}

type FileIMResponse

type FileIMResponse struct {
	Files []models.FileIM
	// contains filtered or unexported fields
}

type ForgotPasswordResponse

type ForgotPasswordResponse struct {
	Status
}

type GeneratePersonalAccessTokenResponse

type GeneratePersonalAccessTokenResponse struct {
	Status
	Token string `json:"token"`
}

type GetIntegrationRequest

type GetIntegrationRequest struct {
	ID       string `json:"integrationId"`
	CreateBy string `json:"createBy"`
}

type GetIntegrationResponse

type GetIntegrationResponse struct {
	Integration struct {
		ID            string    `json:"_id"`
		Type          string    `json:"type"`
		Name          string    `json:"name"`
		Event         string    `json:"event"`
		Enabled       bool      `json:"enabled"`
		Username      string    `json:"username"`
		Urls          []string  `json:"urls"`
		ScriptEnabled bool      `json:"scriptEnabled"`
		Channel       []string  `json:"channel"`
		UserID        string    `json:"userId"`
		CreatedAt     time.Time `json:"_createdAt"`
		CreatedBy     struct {
			ID       string `json:"_id"`
			Username string `json:"username"`
		} `json:"_createdBy"`
		UpdatedAt time.Time `json:"_updatedAt"`
	} `json:"integration"`
	Status
}

type GetOneResponse

type GetOneResponse struct {
	Status
	Subscription struct {
		ID            string    `json:"_id"`
		Open          bool      `json:"open"`
		Alert         bool      `json:"alert"`
		Unread        int       `json:"unread"`
		UserMentions  int       `json:"userMentions"`
		GroupMentions int       `json:"groupMentions"`
		Ts            time.Time `json:"ts"`
		Rid           string    `json:"rid"`
		Name          string    `json:"name"`
		Fname         string    `json:"fname"`
		CustomFields  struct {
		} `json:"customFields"`
		T string `json:"t"`
		U struct {
			ID       string      `json:"_id"`
			Username string      `json:"username"`
			Name     interface{} `json:"name"`
		} `json:"u"`
		Ls                          time.Time `json:"ls"`
		UpdatedAt                   time.Time `json:"_updatedAt"`
		Roles                       []string  `json:"roles"`
		DisableNotifications        bool      `json:"disableNotifications"`
		EmailNotifications          string    `json:"emailNotifications"`
		AudioNotificationValue      string    `json:"audioNotificationValue"`
		DesktopNotificationDuration int       `json:"desktopNotificationDuration"`
		AudioNotifications          string    `json:"audioNotifications"`
		MobilePushNotifications     string    `json:"mobilePushNotifications"`
		F                           bool      `json:"f"`
		Meta                        struct {
			Revision int   `json:"revision"`
			Created  int64 `json:"created"`
			Version  int   `json:"version"`
		} `json:"meta"`
	} `json:"subscription"`
}

type GetPersonalAccessTokensResponse

type GetPersonalAccessTokensResponse struct {
	Status
	Tokens []struct {
		Name            string    `json:"name"`
		CreatedAt       time.Time `json:"createdAt"`
		LastTokenPart   string    `json:"lastTokenPart"`
		BypassTwoFactor bool      `json:"bypassTwoFactor,omitempty"`
	} `json:"tokens"`
}

type GetPreferencesResponse

type GetPreferencesResponse struct {
	Status
	Preferences models.Preferences `json:"preferences"`
}

type GetRoomDiscussionResponse

type GetRoomDiscussionResponse struct {
	Status
	Discussions []struct {
		ID         string `json:"_id"`
		Name       string `json:"name"`
		Fname      string `json:"fname"`
		T          string `json:"t"`
		Msgs       int    `json:"msgs"`
		UsersCount int    `json:"usersCount"`
		U          struct {
			ID       string `json:"_id"`
			Username string `json:"username"`
		} `json:"u"`
		Topic       string    `json:"topic"`
		Prid        string    `json:"prid"`
		Ts          time.Time `json:"ts"`
		Ro          bool      `json:"ro"`
		Default     bool      `json:"default"`
		SysMes      bool      `json:"sysMes"`
		UpdatedAt   time.Time `json:"_updatedAt"`
		LastMessage struct {
			ID  string    `json:"_id"`
			Rid string    `json:"rid"`
			Msg string    `json:"msg"`
			Ts  time.Time `json:"ts"`
			U   struct {
				ID       string `json:"_id"`
				Username string `json:"username"`
				Name     string `json:"name"`
			} `json:"u"`
			UpdatedAt time.Time     `json:"_updatedAt"`
			Mentions  []interface{} `json:"mentions"`
			Channels  []interface{} `json:"channels"`
		} `json:"lastMessage"`
		Lm time.Time `json:"lm"`
	} `json:"discussions"`
	Count  int `json:"count"`
	Offset int `json:"offset"`
	Total  int `json:"total"`
}

type GetRoomInfoResponse

type GetRoomInfoResponse struct {
	Status
	Room struct {
		ID          string        `json:"_id"`
		Ts          time.Time     `json:"ts"`
		T           string        `json:"t"`
		Name        string        `json:"name"`
		Usernames   []interface{} `json:"usernames"`
		Msgs        int           `json:"msgs"`
		UsersCount  int           `json:"usersCount"`
		Default     bool          `json:"default"`
		UpdatedAt   time.Time     `json:"_updatedAt"`
		LastMessage struct {
			ID          string        `json:"_id"`
			Alias       string        `json:"alias"`
			Msg         string        `json:"msg"`
			Attachments []interface{} `json:"attachments"`
			ParseUrls   bool          `json:"parseUrls"`
			Groupable   bool          `json:"groupable"`
			Ts          time.Time     `json:"ts"`
			U           struct {
				ID       string `json:"_id"`
				Username string `json:"username"`
				Name     string `json:"name"`
			} `json:"u"`
			Rid       string        `json:"rid"`
			UpdatedAt time.Time     `json:"_updatedAt"`
			Mentions  []interface{} `json:"mentions"`
			Channels  []interface{} `json:"channels"`
		} `json:"lastMessage"`
		Lm time.Time `json:"lm"`
	} `json:"room"`
}

type GetRoomResponse

type GetRoomResponse struct {
	Status
	Update []struct {
		ID          string        `json:"_id"`
		T           string        `json:"t"`
		Name        string        `json:"name"`
		Usernames   []interface{} `json:"usernames,omitempty"`
		UsersCount  int           `json:"usersCount"`
		Default     bool          `json:"default"`
		UpdatedAt   time.Time     `json:"_updatedAt"`
		LastMessage struct {
			ID          string        `json:"_id"`
			Alias       string        `json:"alias"`
			Msg         string        `json:"msg"`
			Attachments []interface{} `json:"attachments"`
			ParseUrls   bool          `json:"parseUrls"`
			Groupable   bool          `json:"groupable"`
			Ts          time.Time     `json:"ts"`
			U           struct {
				ID       string `json:"_id"`
				Username string `json:"username"`
				Name     string `json:"name"`
			} `json:"u"`
			Rid       string        `json:"rid"`
			UpdatedAt time.Time     `json:"_updatedAt"`
			Mentions  []interface{} `json:"mentions"`
			Channels  []interface{} `json:"channels"`
		} `json:"lastMessage"`
		Fname string `json:"fname,omitempty"`
		U     struct {
			ID       string `json:"_id"`
			Username string `json:"username"`
		} `json:"u,omitempty"`
		CustomFields struct {
		} `json:"customFields,omitempty"`
		Broadcast bool `json:"broadcast,omitempty"`
		Encrypted bool `json:"encrypted,omitempty"`
		Ro        bool `json:"ro,omitempty"`
		SysMes    bool `json:"sysMes,omitempty"`
	} `json:"update"`
	Remove []interface{} `json:"remove"`
}

type GetStatusResponse

type GetStatusResponse struct {
	Status
	ID               string `json:"_id"`
	ConnectionStatus string `json:"connectionStatus"`
}

type GetSubscriptionsResponse

type GetSubscriptionsResponse struct {
	Status
	Update []struct {
		ID            string    `json:"_id"`
		Open          bool      `json:"open"`
		Alert         bool      `json:"alert"`
		Unread        int       `json:"unread"`
		UserMentions  int       `json:"userMentions"`
		GroupMentions int       `json:"groupMentions"`
		Ts            time.Time `json:"ts,omitempty"`
		Rid           string    `json:"rid"`
		Name          string    `json:"name"`
		Fname         string    `json:"fname"`
		T             string    `json:"t"`
		U             struct {
			ID       string `json:"_id"`
			Username string `json:"username"`
		} `json:"u"`
		Ls                      time.Time     `json:"ls,omitempty"`
		UpdatedAt               time.Time     `json:"_updatedAt"`
		Roles                   []string      `json:"roles,omitempty"`
		DesktopNotifications    string        `json:"desktopNotifications"`
		MobilePushNotifications string        `json:"mobilePushNotifications"`
		EmailNotifications      string        `json:"emailNotifications"`
		Prid                    string        `json:"prid,omitempty"`
		F                       bool          `json:"f,omitempty"`
		Ignored                 []interface{} `json:"ignored,omitempty"`
	} `json:"update"`
	Remove []interface{} `json:"remove"`
}

type GetUsernameSuggestionResponse

type GetUsernameSuggestionResponse struct {
	Status
	Result string `json:"result"`
}

type GetUsersInRoleResponse

type GetUsersInRoleResponse struct {
	Status
	Users []struct {
		ID       string `json:"_id"`
		Username string `json:"username"`
		Type     string `json:"type"`
		Status   string `json:"status"`
		Active   bool   `json:"active"`
		Name     string `json:"name"`
	} `json:"users"`
}

type GroupAddAllResponse

type GroupAddAllResponse struct {
	Status
	Channel struct {
		ID        string   `json:"_id"`
		Name      string   `json:"name"`
		T         string   `json:"t"`
		Usernames []string `json:"usernames"`
		Msgs      int      `json:"msgs"`
		U         struct {
			ID       string `json:"_id"`
			Username string `json:"username"`
		} `json:"u"`
		Ts time.Time `json:"ts"`
	} `json:"channel"`
}

type GroupAddLeaderResponse

type GroupAddLeaderResponse struct {
	Status
}

type GroupAddModeratorResponse

type GroupAddModeratorResponse struct {
	Status
}

type GroupAddOwnerResponse

type GroupAddOwnerResponse struct {
	Status
}

type GroupAnnouncementResponse

type GroupAnnouncementResponse struct {
	Status
	Announcement string `json:"announcement"`
}

type GroupArchiveResponse

type GroupArchiveResponse struct {
	Status
}

type GroupCloseResponse

type GroupCloseResponse struct {
	Status
}

type GroupCountersResponse

type GroupCountersResponse struct {
	Status
	Joined       bool      `json:"joined"`
	Members      int       `json:"members"`
	Unreads      int       `json:"unreads"`
	UnreadsFrom  time.Time `json:"unreadsFrom"`
	Msgs         int       `json:"msgs"`
	Latest       time.Time `json:"latest"`
	UserMentions int       `json:"userMentions"`
}

type GroupCustomFieldsResponse

type GroupCustomFieldsResponse struct {
	Status
	Group struct {
		ID    string `json:"_id"`
		Name  string `json:"name"`
		Fname string `json:"fname"`
		T     string `json:"t"`
		Msgs  int    `json:"msgs"`
		U     struct {
			ID       string `json:"_id"`
			Username string `json:"username"`
		} `json:"u"`
		CustomFields struct {
			Company string `json:"company"`
		} `json:"customFields"`
		Ts        time.Time `json:"ts"`
		Ro        bool      `json:"ro"`
		SysMes    bool      `json:"sysMes"`
		UpdatedAt time.Time `json:"_updatedAt"`
		Username  string    `json:"username"`
	} `json:"group"`
	DeveloperWarning string `json:"developerWarning"`
}

type GroupDeleteResponse

type GroupDeleteResponse struct {
	Status
}

type GroupDescriptionResponse

type GroupDescriptionResponse struct {
	Status
	Description string `json:"description"`
}

type GroupFilesResponse

type GroupFilesResponse struct {
	Status
	Files []struct {
		ID          string `json:"_id"`
		Name        string `json:"name"`
		Size        int    `json:"size"`
		Type        string `json:"type"`
		Rid         string `json:"rid"`
		Description string `json:"description"`
		Store       string `json:"store"`
		Complete    bool   `json:"complete"`
		Uploading   bool   `json:"uploading"`
		Extension   string `json:"extension"`
		Progress    int    `json:"progress"`
		User        struct {
			ID       string `json:"_id"`
			Username string `json:"username"`
			Name     string `json:"name"`
		} `json:"user"`
		UpdatedAt  time.Time `json:"_updatedAt"`
		InstanceID string    `json:"instanceId"`
		Etag       string    `json:"etag"`
		Path       string    `json:"path"`
		Token      string    `json:"token"`
		UploadedAt time.Time `json:"uploadedAt"`
		URL        string    `json:"url"`
	} `json:"files"`
}

type GroupHistoryResponse

type GroupHistoryResponse struct {
	Status
	Messages []struct {
		ID  string    `json:"_id"`
		Rid string    `json:"rid"`
		Msg string    `json:"msg"`
		Ts  time.Time `json:"ts"`
		U   struct {
			ID       string `json:"_id"`
			Username string `json:"username"`
		} `json:"u"`
		UpdatedAt time.Time `json:"_updatedAt"`
		T         string    `json:"t,omitempty"`
		Groupable bool      `json:"groupable,omitempty"`
	} `json:"messages"`
}

type GroupInfoResponse

type GroupInfoResponse struct {
	Status
	Group struct {
		ID         string `json:"_id"`
		Name       string `json:"name"`
		Fname      string `json:"fname"`
		T          string `json:"t"`
		Msgs       int    `json:"msgs"`
		UsersCount int    `json:"usersCount"`
		U          struct {
			ID       string `json:"_id"`
			Username string `json:"username"`
		} `json:"u"`
		CustomFields struct {
		} `json:"customFields"`
		Broadcast bool      `json:"broadcast"`
		Encrypted bool      `json:"encrypted"`
		Ts        time.Time `json:"ts"`
		Ro        bool      `json:"ro"`
		Default   bool      `json:"default"`
		SysMes    bool      `json:"sysMes"`
		UpdatedAt time.Time `json:"_updatedAt"`
	} `json:"group"`
}

type GroupInviteResponse

type GroupInviteResponse struct {
	Status
	Group struct {
		ID        string    `json:"_id"`
		Ts        time.Time `json:"ts"`
		T         string    `json:"t"`
		Name      string    `json:"name"`
		Usernames []string  `json:"usernames"`
		U         struct {
			ID       string `json:"_id"`
			Username string `json:"username"`
		} `json:"u"`
		Msgs      int       `json:"msgs"`
		UpdatedAt time.Time `json:"_updatedAt"`
		Lm        time.Time `json:"lm"`
	} `json:"group"`
}

type GroupKickResponse

type GroupKickResponse struct {
	Status
}

type GroupLeaveResponse

type GroupLeaveResponse struct {
	Status
}

type GroupListAllResponse

type GroupListAllResponse struct {
	Status
	Groups []struct {
		ID    string `json:"_id"`
		Name  string `json:"name"`
		Fname string `json:"fname"`
		T     string `json:"t"`
		Msgs  int    `json:"msgs"`
		U     struct {
			ID       string `json:"_id"`
			Username string `json:"username"`
		} `json:"u"`
		CustomFields struct {
			CompanyID string `json:"companyId"`
		} `json:"customFields"`
		Ts        time.Time `json:"ts"`
		Ro        bool      `json:"ro"`
		SysMes    bool      `json:"sysMes"`
		UpdatedAt time.Time `json:"_updatedAt"`
	} `json:"groups"`
}

type GroupListResponse

type GroupListResponse struct {
	Status
	models.GroupList
}

type GroupMembersResponse

type GroupMembersResponse struct {
	Status
	Members []struct {
		ID        string `json:"_id"`
		Status    string `json:"status"`
		Name      string `json:"name"`
		UtcOffset int    `json:"utcOffset"`
		Username  string `json:"username"`
	} `json:"members"`
}

type GroupMessagesResponse

type GroupMessagesResponse struct {
	Status
	Messages []struct {
		ID  string    `json:"_id"`
		Rid string    `json:"rid"`
		Msg string    `json:"msg"`
		Ts  time.Time `json:"ts"`
		U   struct {
			ID       string `json:"_id"`
			Username string `json:"username"`
			Name     string `json:"name"`
		} `json:"u,omitempty"`
		UpdatedAt time.Time `json:"_updatedAt"`
		Reactions struct {
			Frowning2 struct {
				Usernames []string `json:"usernames"`
			} `json:":frowning2:"`
		} `json:"reactions,omitempty"`
		Mentions []interface{} `json:"mentions,omitempty"`
		Channels []interface{} `json:"channels,omitempty"`
		Starred  struct {
			ID string `json:"_id"`
		} `json:"starred,omitempty"`
		T         string `json:"t,omitempty"`
		Groupable bool   `json:"groupable,omitempty"`
	} `json:"messages"`
}

type GroupModeratorsResponse

type GroupModeratorsResponse struct {
	Status
	Moderators []struct {
		ID       string `json:"_id"`
		Username string `json:"username"`
		Name     string `json:"name"`
	} `json:"moderators"`
}

type GroupOnlineResponse

type GroupOnlineResponse struct {
	Status
	Online []struct {
		ID       string `json:"_id"`
		Username string `json:"username"`
	} `json:"online"`
}

type GroupOpenResponse

type GroupOpenResponse struct {
	Status
}

type GroupReadOnlyResponse

type GroupReadOnlyResponse struct {
	Status
	Group struct {
		ID   string `json:"_id"`
		Name string `json:"name"`
		T    string `json:"t"`
		Msgs int    `json:"msgs"`
		U    struct {
			ID       string `json:"_id"`
			Username string `json:"username"`
		} `json:"u"`
		Ts               time.Time     `json:"ts"`
		Ro               bool          `json:"ro"`
		SysMes           bool          `json:"sysMes"`
		UpdatedAt        time.Time     `json:"_updatedAt"`
		Usernames        []string      `json:"usernames"`
		JoinCodeRequired bool          `json:"joinCodeRequired"`
		Muted            []interface{} `json:"muted"`
	} `json:"group"`
}

type GroupRemoveLeaderResponse

type GroupRemoveLeaderResponse struct {
	Status
}

type GroupRemoveModeratorResponse

type GroupRemoveModeratorResponse struct {
	Status
}

type GroupRemoveOwnerResponse

type GroupRemoveOwnerResponse struct {
	Status
}

type GroupRenameResponse

type GroupRenameResponse struct {
	Status
	Group struct {
		ID        string   `json:"_id"`
		Name      string   `json:"name"`
		T         string   `json:"t"`
		Usernames []string `json:"usernames"`
		Msgs      int      `json:"msgs"`
		U         struct {
			ID       string `json:"_id"`
			Username string `json:"username"`
		} `json:"u"`
		Ts        time.Time `json:"ts"`
		Ro        bool      `json:"ro"`
		SysMes    bool      `json:"sysMes"`
		UpdatedAt time.Time `json:"_updatedAt"`
	} `json:"group"`
}

type GroupRolesResponse

type GroupRolesResponse struct {
	Status
	Roles []struct {
		Rid string `json:"rid"`
		U   struct {
			ID       string `json:"_id"`
			Username string `json:"username"`
			Name     string `json:"name"`
		} `json:"u"`
		Roles []string `json:"roles"`
		ID    string   `json:"_id"`
	} `json:"roles"`
}

type GroupTopicResponse

type GroupTopicResponse struct {
	Status
	Topic string `json:"topic"`
}

type GroupTypeResponse

type GroupTypeResponse struct {
	Status
	Group struct {
		ID   string `json:"_id"`
		Name string `json:"name"`
		T    string `json:"t"`
		Msgs int    `json:"msgs"`
		U    struct {
			ID       string `json:"_id"`
			Username string `json:"username"`
		} `json:"u"`
		Ts               time.Time     `json:"ts"`
		Ro               bool          `json:"ro"`
		SysMes           bool          `json:"sysMes"`
		UpdatedAt        time.Time     `json:"_updatedAt"`
		Usernames        []string      `json:"usernames"`
		JoinCodeRequired bool          `json:"joinCodeRequired"`
		Muted            []interface{} `json:"muted"`
	} `json:"group"`
}

type GroupUnArchiveResponse

type GroupUnArchiveResponse struct {
	Status
}

type HistoryIMResponse

type HistoryIMResponse struct {
	Status
	Messages []models.Message `json:"messages"`
}

type HistoryIntegrationResponse

type HistoryIntegrationResponse struct {
	History []models.IntegrationHistory `json:"history"`
	// contains filtered or unexported fields
}

type InfoResponse

type InfoResponse struct {
	Status
	Info models.Info `json:"info"`
}

type LeaveRoomResponse

type LeaveRoomResponse struct {
	Status
}

type ListAllResponse

type ListAllResponse struct {
	Status
	Update []models.Update `json:"update"`
	Remove []interface{}   `json:"remove"`
}

type ListIMResponse

type ListIMResponse struct {
	Ims []models.ListIM
	// contains filtered or unexported fields
}

type ListIntegrationResponse

type ListIntegrationResponse struct {
	Integration []models.Integration `json:"integrations"`
	// contains filtered or unexported fields
}

type ListInvitesResponse

type ListInvitesResponse []models.Invite

type LiveChatConfigResponse

type LiveChatConfigResponse struct {
	Config models.LiveChatConfig `json:"config"`
	Status
}

type LiveChatCustomFieldRequest

type LiveChatCustomFieldRequest struct {
	Token     string `json:"token"`
	Key       string `json:"key"`
	Value     string `json:"value"`
	Overwrite bool   `json:"overwrite"`
}

type LiveChatCustomFieldResponse

type LiveChatCustomFieldResponse struct {
	Field struct {
		Key       string `json:"key"`
		Value     string `json:"value"`
		Overwrite bool   `json:"overwrite"`
	} `json:"field"`
	Status
}

type LiveChatCustomFields

type LiveChatCustomFields struct {
	Key       string `json:"key"`
	Value     string `json:"value"`
	Overwrite bool   `json:"overwrite"`
}

type LiveChatCustomFieldsRequest

type LiveChatCustomFieldsRequest struct {
	Token        string         `json:"token"`
	CustomFields []CustomFields `json:"customFields"`
}

type LiveChatCustomFieldsResponse

type LiveChatCustomFieldsResponse struct {
	Fields []struct {
		Key       string `json:"Key"`
		Value     string `json:"value"`
		Overwrite bool   `json:"overwrite"`
	} `json:"fields"`
	Status
}

type LiveChatCustom_FieldResponse

type LiveChatCustom_FieldResponse struct {
	CustomField struct {
		ID         string    `json:"_id"`
		Label      string    `json:"label"`
		Scope      string    `json:"scope"`
		Visibility string    `json:"visibility"`
		UpdatedAt  time.Time `json:"_updatedAt"`
	} `json:"customField"`
	Status
}

type LiveChatCustom_FieldsResponse

type LiveChatCustom_FieldsResponse struct {
	CustomFields []struct {
		ID         string    `json:"_id"`
		Label      string    `json:"label"`
		Scope      string    `json:"scope"`
		Visibility string    `json:"visibility"`
		UpdatedAt  time.Time `json:"_updatedAt"`
	} `json:"customFields"`
	// contains filtered or unexported fields
}

type LiveChatDeleteMessageRequest

type LiveChatDeleteMessageRequest struct {
	Token string `json:"token"`
	Rid   string `json:"rid"`
}

type LiveChatDeleteMessageRequset

type LiveChatDeleteMessageRequset struct {
	ID string `json:"_id"`
}

type LiveChatDeleteMessageResponse

type LiveChatDeleteMessageResponse struct {
	Message struct {
		ID  string `json:"_id"`
		Msg string `json:"msg"`
		U   struct {
			ID       string `json:"_id"`
			Username string `json:"username"`
			Name     string `json:"name"`
		} `json:"u"`
		Ts time.Time `json:"ts"`
	} `json:"message"`
	Status
}

type LiveChatDepartmentRequest

type LiveChatDepartmentRequest struct {
	Department models.Department        `json:"department"`
	Agents     []models.AgentDepartment `json:"agents"`
}

type LiveChatDepartmentsResponse

type LiveChatDepartmentsResponse struct {
	Departments []models.Department `json:"departments"`
	Status
}

type LiveChatGetInfoUserResponse

type LiveChatGetInfoUserResponse struct {
	User models.LiveChatUser `json:"user"`
	Status
}

type LiveChatGetOneInquiriesRequest

type LiveChatGetOneInquiriesRequest struct {
	RoomId string `json:"roomId"`
}

type LiveChatGetOneInquiriesResponse

type LiveChatGetOneInquiriesResponse struct {
	Inquiry models.Inquiry
	Status
}

type LiveChatGetUsersResponse

type LiveChatGetUsersResponse struct {
	Users []models.LiveChatUsers `json:"users"`
	Status
}

type LiveChatIntegraionSettingResponse

type LiveChatIntegraionSettingResponse struct {
	Settings []models.IntegrationSetting
	Status
}

type LiveChatListInquiriesResponse

type LiveChatListInquiriesResponse struct {
	Inquiries []models.Inquiry
	// contains filtered or unexported fields
}

type LiveChatLoadHistoryRequest

type LiveChatLoadHistoryRequest struct {
	Rid   string    `json:"rid`
	Token string    `json:"token"`
	Ts    time.Time `json:"ts"`
	End   time.Time `json:"end"`
	Limit int       `json:"limit"`
}

type LiveChatLoadHistoryResponse

type LiveChatLoadHistoryResponse struct {
	Messages        []models.Message `json:"messages"`
	UnreadNotLoaded int              `json:"unreadNotLoaded"`
	Status
}

type LiveChatMessageRequest

type LiveChatMessageRequest struct {
	Token string `json:"token"`
	Rid   string `json:"rid"`
	Msg   string `json:"msg"`
	Id    string `json:"_id,omitempty"`
	Agent string `json:"agent,omitempty"`
}

type LiveChatMessageResponse

type LiveChatMessageResponse struct {
	Message struct {
		ID  string `json:"_id"`
		Msg string `json:"msg"`
		U   struct {
			ID       string `json:"_id"`
			Username string `json:"username"`
			Name     string `json:"name"`
		} `json:"u"`
		Ts time.Time `json:"ts"`
	} `json:"message"`
	Status
}

type LiveChatOfficeHourResponse

type LiveChatOfficeHourResponse struct {
	OfficeHours []models.LiveChatOfficeHour
	Status
}

type LiveChatOfflineSendRequest

type LiveChatOfflineSendRequest struct {
	Name    string `json:"name"`
	Email   string `json:"email"`
	Message string `json:"message"`
}

type LiveChatOfflineSendResponse

type LiveChatOfflineSendResponse struct {
	Message string `json:"message"`
	Status
}

type LiveChatQueryDepartmentResponse

type LiveChatQueryDepartmentResponse struct {
	Departments models.Department        `json:"department"`
	Agents      []models.AgentDepartment `json:"agents,omitempty"`
	Status
}

type LiveChatQueueResponse

type LiveChatQueueResponse struct {
	Queue []struct {
		Chats int `json:"chats"`
		User  struct {
			ID       string `json:"_id"`
			Username string `json:"username"`
			Status   string `json:"status"`
		} `json:"user"`
		Department struct {
			ID   interface{} `json:"_id"`
			Name interface{} `json:"name"`
		} `json:"department"`
	} `json:"queue"`
	// contains filtered or unexported fields
}

type LiveChatRegisterDepartmentResponse

type LiveChatRegisterDepartmentResponse struct {
	Departments []models.Department `json:"departments"`
	Status
}

type LiveChatRegisterUserRequset

type LiveChatRegisterUserRequset struct {
	// Type     string `json:"type"`
	Username string `json:"username"`
}

type LiveChatRegisterUserResponse

type LiveChatRegisterUserResponse struct {
	User models.LiveChatUser `json:"user"`
	Status
}

type LiveChatRemoveDepartmentResponse

type LiveChatRemoveDepartmentResponse struct {
	Status
}

type LiveChatRemoveUserResponse

type LiveChatRemoveUserResponse struct {
	Status
}

type LiveChatResgisterDepartmentRequest

type LiveChatResgisterDepartmentRequest struct {
	Department models.Department        `json:"department"`
	Agents     []models.AgentDepartment `json:"agents,omitempty"`
}

type LiveChatRoomCloseRequest

type LiveChatRoomCloseRequest struct {
	Rid   string `json:"rid"`
	Token string `json:"token"`
}

type LiveChatRoomCloseResponse

type LiveChatRoomCloseResponse struct {
	Rid     string `json:"rid"`
	Comment string `json:"comment"`
	Status
}

type LiveChatRoomForwardRequest

type LiveChatRoomForwardRequest struct {
	RoomId       string `json:"roomId"`
	UserId       string `json:"userId"`
	DepartmentId string `json:"departmentId"`
}

type LiveChatRoomForwardResponse

type LiveChatRoomForwardResponse struct {
	Status
}

type LiveChatRoomResponse

type LiveChatRoomResponse struct {
	Room    models.LiveChatRoom `json:"room"`
	NewRoom bool                `json:"newRoom"`
	Status
}

type LiveChatRoomSurveyRequest

type LiveChatRoomSurveyRequest struct {
	Rid   string `json:"rid"`
	Token string `json:"token"`
	Data  []Data `json:"data"`
}

type LiveChatRoomSurveyResponse

type LiveChatRoomSurveyResponse struct {
	Rid  string `json:"rid"`
	Data struct {
		Satisfaction       string `json:"satisfaction"`
		AgentResposiveness string `json:"agentResposiveness"`
	} `json:"data"`
	Status
}

type LiveChatRoomTransferRequest

type LiveChatRoomTransferRequest struct {
	Rid        string `json:"rid"`
	Token      string `json:"token"`
	Department string `json:"department"`
}

type LiveChatRoomTransferResponse

type LiveChatRoomTransferResponse struct {
	Room models.LiveChatRoomTransfer `json:"room"`
	Status
}

type LiveChatRoomsResponse

type LiveChatRoomsResponse struct {
	Rooms []models.LiveChatRoom
	// contains filtered or unexported fields
}

type LiveChatTakeInquiriesRequest

type LiveChatTakeInquiriesRequest struct {
	InquiryId string `json:"inquiryId"`
	UserId    string `json:"userId"`
}

type LiveChatTakeInquiriesResponse

type LiveChatTakeInquiriesResponse struct {
	Inquiries []models.Inquiry
	Status
}

type LiveChatTranscriptRequest

type LiveChatTranscriptRequest struct {
	Rid   string `json:"rid"`
	Token string `json:"token"`
	Email string `json:"email"`
}

type LiveChatTranscriptResponse

type LiveChatTranscriptResponse struct {
	Message string `json:"message"`
	Status
}

type LiveChatTriggerResponse

type LiveChatTriggerResponse struct {
	Trigger models.LiveChatTrigger `json:"trigger"`
	Status
}

type LiveChatTriggersResponse

type LiveChatTriggersResponse struct {
	Triggers []models.LiveChatTrigger `json:"triggers"`
	// contains filtered or unexported fields
}

type LiveChatUpdateDepartmentRequest

type LiveChatUpdateDepartmentRequest struct {
	Department models.Department        `json:"department"`
	Agents     []models.AgentDepartment `json:"agents,omitempty"`
}

type LiveChatUpdateDepartmentResponse

type LiveChatUpdateDepartmentResponse struct {
	Department models.Department        `json:"department"`
	Agents     []models.AgentDepartment `json:"agents"`
	Status
}

type LiveChatUpdateMessageRequest

type LiveChatUpdateMessageRequest struct {
	Token string `json:"token"`
	Rid   string `json:"rid"`
	Msg   string `json:"msg"`
}

type LiveChatUpdateMessageResponse

type LiveChatUpdateMessageResponse struct {
	Message struct {
		ID  string `json:"_id"`
		Msg string `json:"msg"`
		U   struct {
			ID       string `json:"_id"`
			Username string `json:"username"`
			Name     string `json:"name"`
		} `json:"u"`
		Ts time.Time `json:"ts"`
	} `json:"message"`
	Status
}

type LiveChatVideoCallResponse

type LiveChatVideoCallResponse struct {
	VideoCall struct {
		Rid      string    `json:"rid"`
		Domain   string    `json:"domain"`
		Provider string    `json:"provider"`
		Room     string    `json:"room"`
		Timeout  time.Time `json:"timeout"`
	} `json:"videoCall"`
	Status
}

type LiveChatVisitorChatHistoryResponse

type LiveChatVisitorChatHistoryResponse struct {
	History []struct {
		ID         string    `json:"_id"`
		Msgs       int       `json:"msgs"`
		UsersCount int       `json:"usersCount"`
		Lm         time.Time `json:"lm"`
		Fname      string    `json:"fname"`
		T          string    `json:"t"`
		Ts         time.Time `json:"ts"`
		V          struct {
			ID       string `json:"_id"`
			Username string `json:"username"`
			Token    string `json:"token"`
			Status   string `json:"status"`
		} `json:"v,omitempty"`
		Cl              bool      `json:"cl"`
		Open            bool      `json:"open,omitempty"`
		WaitingResponse bool      `json:"waitingResponse,omitempty"`
		UpdatedAt       time.Time `json:"_updatedAt"`
		ServedBy        struct {
			ID       string    `json:"_id"`
			Username string    `json:"username"`
			Ts       time.Time `json:"ts"`
		} `json:"servedBy"`
		LastMessage struct {
			ID  string    `json:"_id"`
			Rid string    `json:"rid"`
			Msg string    `json:"msg"`
			Ts  time.Time `json:"ts"`
			U   struct {
				ID       string `json:"_id"`
				Username string `json:"username"`
				Name     string `json:"name"`
			} `json:"u"`
			UpdatedAt time.Time     `json:"_updatedAt"`
			Mentions  []interface{} `json:"mentions"`
			Channels  []interface{} `json:"channels"`
		} `json:"lastMessage,omitempty"`
		ResponseBy struct {
			ID            string    `json:"_id"`
			Username      string    `json:"username"`
			LastMessageTs time.Time `json:"lastMessageTs"`
		} `json:"responseBy,omitempty"`
		Metrics struct {
			Reaction struct {
				Fd time.Time `json:"fd"`
				Ft float64   `json:"ft"`
				Tt float64   `json:"tt"`
			} `json:"reaction"`
			Response struct {
				Avg   float64   `json:"avg"`
				Fd    time.Time `json:"fd"`
				Ft    float64   `json:"ft"`
				Total int       `json:"total"`
				Tt    float64   `json:"tt"`
			} `json:"response"`
		} `json:"metrics,omitempty"`
		ClosedAt time.Time `json:"closedAt,omitempty"`
		ClosedBy struct {
			ID       string `json:"_id"`
			Username string `json:"username"`
		} `json:"closedBy,omitempty"`
		Closer   string `json:"closer,omitempty"`
		Metricss struct {
			ChatDuration        float64 `json:"chatDuration"`
			ServiceTimeDuration float64 `json:"serviceTimeDuration"`
			Reaction            struct {
				Fd time.Time `json:"fd"`
				Ft float64   `json:"ft"`
				Tt float64   `json:"tt"`
			} `json:"reaction"`
			Response struct {
				Avg   float64   `json:"avg"`
				Fd    time.Time `json:"fd"`
				Ft    float64   `json:"ft"`
				Total int       `json:"total"`
				Tt    float64   `json:"tt"`
			} `json:"response"`
		} `json:"metrics,omitempty"`
		Tags         []interface{} `json:"tags,omitempty"`
		LastMessagee struct {
			T                   string    `json:"t"`
			Msg                 string    `json:"msg"`
			Groupable           bool      `json:"groupable"`
			TranscriptRequested bool      `json:"transcriptRequested"`
			Ts                  time.Time `json:"ts"`
			U                   struct {
				ID       string `json:"_id"`
				Username string `json:"username"`
				Name     string `json:"name"`
			} `json:"u"`
			Rid       string        `json:"rid"`
			ID        string        `json:"_id"`
			UpdatedAt time.Time     `json:"_updatedAt"`
			Mentions  []interface{} `json:"mentions"`
			Channels  []interface{} `json:"channels"`
		} `json:"lastMessage,omitempty"`
		VV struct {
			ID            string    `json:"_id"`
			Username      string    `json:"username"`
			Token         string    `json:"token"`
			Status        string    `json:"status"`
			LastMessageTs time.Time `json:"lastMessageTs"`
		} `json:"v,omitempty"`
		LastMessageee struct {
			ID    string    `json:"_id"`
			Rid   string    `json:"rid"`
			Msg   string    `json:"msg"`
			Token string    `json:"token"`
			Alias string    `json:"alias"`
			Ts    time.Time `json:"ts"`
			U     struct {
				ID       string `json:"_id"`
				Username string `json:"username"`
				Name     string `json:"name"`
			} `json:"u"`
			UpdatedAt time.Time     `json:"_updatedAt"`
			Mentions  []interface{} `json:"mentions"`
			Channels  []interface{} `json:"channels"`
		} `json:"lastMessage,omitempty"`
		Metricsss struct {
			V struct {
				Lq time.Time `json:"lq"`
			} `json:"v"`
		} `json:"metrics,omitempty"`
	} `json:"history"`
	// contains filtered or unexported fields
}

type LiveChatVisitorInfoResponse

type LiveChatVisitorInfoResponse struct {
	Visitor struct {
		ID        string    `json:"_id"`
		Username  string    `json:"username"`
		UpdatedAt time.Time `json:"_updatedAt"`
		Token     string    `json:"token"`
	} `json:"visitor"`
	Status
}

type LiveChatVisitorNavigationHistoryRequest

type LiveChatVisitorNavigationHistoryRequest struct {
	Token    string `json:"token"`
	Rid      string `json:"rid"`
	PageInfo struct {
		Change   string `json:"change"`
		Title    string `json:"title"`
		Location struct {
			Href string `json:"href"`
		} `json:"location"`
	} `json:"pageInfo"`
}

type PageInfo struct{

}

type LiveChatVisitorNavigationHistoryResponse

type LiveChatVisitorNavigationHistoryResponse struct {
	Page struct {
		Msg        string `json:"msg"`
		Navigation struct {
			Page struct {
				Change   string `json:"change"`
				Title    string `json:"title"`
				Location struct {
					Href string `json:"href"`
				} `json:"location"`
			} `json:"page"`
			Token string `json:"token"`
		} `json:"navigation"`
	} `json:"page"`
	Status
}

type LiveChatVisitorNavigationHistoryRetrieveResponse

type LiveChatVisitorNavigationHistoryRetrieveResponse struct {
	Pages []models.LiveChatPage `json:"pages"`
	Status
}

type LiveChatVisitorRegisterRequest

type LiveChatVisitorRegisterRequest struct {
	Visitor struct {
		Name         string         `json:"name"`
		Email        string         `json:"email"`
		Token        string         `json:"token"`
		Phone        string         `json:"phone"`
		CustomFields []CustomFields `json:"visitor"`
	} `json:"visitor"`
}

type LiveChatVisitorRegisterResponse

type LiveChatVisitorRegisterResponse struct {
	Visitor models.LiveChatVisitor `json:"visitor"`
	Status
}

type LiveChatVisitorRetrieveResponse

type LiveChatVisitorRetrieveResponse struct {
	Visitor models.LiveChatVisitor `json:"visitor"`
	Status
}

type LiveChatVisitorSearchResponse

type LiveChatVisitorSearchResponse struct {
	Visitors []models.LiveChatVisitor
	// contains filtered or unexported fields
}

type LogonResponse

type LogonResponse struct {
	Status
	Data struct {
		Token  string `json:"authToken"`
		UserID string `json:"userID"`
	} `json:"data"`
}

type MemberIMResponse

type MemberIMResponse struct {
	Members []models.MemberIM
	// contains filtered or unexported fields
}

type MessageIMResponse

type MessageIMResponse struct {
	Messages []models.Message
	// contains filtered or unexported fields
}

type MessageResponse

type MessageResponse struct {
	Status
	Message models.Message `json:"message"`
}

type MessagesResponse

type MessagesResponse struct {
	Status
	Messages []models.Message `json:"messages"`
}

type NewResponse

type NewResponse interface{}

type OauthAppGetResponse

type OauthAppGetResponse struct {
	OauthApp models.OauthApp `json:"oauthApp"`
	Status
}

type OauthAppListResponse

type OauthAppListResponse struct {
	OauthApps []models.OauthApp `json:"oauthApps"`
	Status
}

type OnlineChannelResponse

type OnlineChannelResponse struct {
	Status
	Online []models.OnlineChannel `json:"online"`
}

type OpenIM

type OpenIM struct {
	RoomId string `json:"roomId"`
}

type OpenIMResponse

type OpenIMResponse struct {
	Status
}

type OtherMessageIMResponse

type OtherMessageIMResponse struct {
	Status
	Messages []models.Message `json:"messages"`
}

type PresenceResponse

type PresenceResponse struct {
	Status
	Users []struct {
		ID         string `json:"_id"`
		Status     string `json:"status"`
		Name       string `json:"name"`
		UtcOffset  int    `json:"utcOffset,omitempty"`
		Username   string `json:"username"`
		StatusText string `json:"statusText,omitempty"`
	} `json:"users"`
	Full bool `json:"full"`
}

type PushTokenDeleteRequest

type PushTokenDeleteRequest struct {
	Token string `json:"token"`
}

type PushTokenDeleteResponse

type PushTokenDeleteResponse struct {
	Status
}

type PushTokenPostRequest

type PushTokenPostRequest struct {
	Id      string `json:"id"`
	Type    string `json:"type"`
	Value   string `json:"value"`
	AppName string `json:"appName"`
}

type PushTokenPostResponse

type PushTokenPostResponse struct {
	Result struct {
		Token struct {
			Gcm string `json:"gcm"`
		} `json:"token"`
		AppName   string    `json:"appName"`
		UserID    string    `json:"userId"`
		Enabled   bool      `json:"enabled"`
		CreatedAt time.Time `json:"createdAt"`
		UpdatedAt time.Time `json:"updatedAt"`
		ID        string    `json:"_id"`
	} `json:"result"`
	Status
}

type ReadResp

type ReadResp struct {
	Status
}

type RegisterUserResponse

type RegisterUserResponse struct {
	Status
	User struct {
		ID        string `json:"_id"`
		Type      string `json:"type"`
		Status    string `json:"status"`
		Active    bool   `json:"active"`
		Name      string `json:"name"`
		UtcOffset int    `json:"utcOffset"`
		Username  string `json:"username"`
	} `json:"user"`
}

type RemoveGeneratePersonalAccessTokenResponse

type RemoveGeneratePersonalAccessTokenResponse struct {
	Status
}

type RemoveIntegrationRequset

type RemoveIntegrationRequset struct {
	Type        string `json:"type"`
	Integration string `json:"integrationId"`
}

type RemoveIntegrationResponse

type RemoveIntegrationResponse struct {
	Status
	Integration models.Integration `json:"integration"`
}

type RemoveInviteRequest

type RemoveInviteRequest struct {
	Id string `json:"_id"`
}

type RemoveInviteResponse

type RemoveInviteResponse bool

type RequestDataDownloadResponse

type RequestDataDownloadResponse struct {
	Status
	Requested       bool                   `json:"requested"`
	ExportOperation models.ExportOperation `json:"exportOperation"`
}

type Response

type Response interface {
	OK() error
}

type RolesListResponse

type RolesListResponse struct {
	Status
	Roles []models.Roles `json:"roles"`
}

type RolesSyncResponse

type RolesSyncResponse struct {
	Status
	Roles struct {
		Update []struct {
			ID           string    `json:"_id"`
			UpdatedAt    time.Time `json:"_updatedAt"`
			Description  string    `json:"description"`
			Mandatory2Fa bool      `json:"mandatory2fa"`
			Protected    bool      `json:"protected"`
			Scope        string    `json:"scope"`
		} `json:"update"`
		Remove []interface{} `json:"remove"`
	} `json:"roles"`
}

type RoomAdminRoomResponse

type RoomAdminRoomResponse struct {
	Status
	Rooms []struct {
		ID         string        `json:"_id"`
		T          string        `json:"t"`
		Name       string        `json:"name"`
		Usernames  []interface{} `json:"usernames"`
		Msgs       int           `json:"msgs"`
		UsersCount int           `json:"usersCount"`
		Default    bool          `json:"default"`
	} `json:"rooms"`
	Count  int `json:"count"`
	Offset int `json:"offset"`
	Total  int `json:"total"`
}

type RoomCleanHistoryResponse

type RoomCleanHistoryResponse struct {
	Status
	Message struct {
		ID  string    `json:"_id"`
		Rid string    `json:"rid"`
		Msg string    `json:"msg"`
		Ts  time.Time `json:"ts"`
		U   struct {
			ID       string `json:"_id"`
			Username string `json:"username"`
		} `json:"u"`
	} `json:"message"`
}

type SaveNotification

type SaveNotification struct {
	Status
}

type SetActiveStatusResponse

type SetActiveStatusResponse struct {
	Status
	User struct {
		ID     string `json:"_id"`
		Active bool   `json:"active"`
	} `json:"user"`
}

type SetPreferencesResponse

type SetPreferencesResponse struct {
	Status
	User struct {
		ID       string `json:"_id"`
		Settings struct {
			Preferences struct {
				AutoImageLoad                         bool          `json:"autoImageLoad"`
				CollapseMediaByDefault                bool          `json:"collapseMediaByDefault"`
				ConvertASCIIEmoji                     bool          `json:"convertAsciiEmoji"`
				DesktopNotificationDuration           int           `json:"desktopNotificationDuration"`
				DesktopNotificationRequireInteraction bool          `json:"desktopNotificationRequireInteraction"`
				DesktopNotifications                  string        `json:"desktopNotifications"`
				DontAskAgainList                      []interface{} `json:"dontAskAgainList"`
				EmailNotificationMode                 string        `json:"emailNotificationMode"`
				EnableAutoAway                        bool          `json:"enableAutoAway"`
				HideAvatars                           bool          `json:"hideAvatars"`
				HideFlexTab                           bool          `json:"hideFlexTab"`
				HideRoles                             bool          `json:"hideRoles"`
				HideUsernames                         bool          `json:"hideUsernames"`
				Highlights                            []interface{} `json:"highlights"`
				IdleTimeLimit                         int           `json:"idleTimeLimit"`
				Language                              string        `json:"language"`
				MessageViewMode                       int           `json:"messageViewMode"`
				MobileNotifications                   string        `json:"mobileNotifications"`
				MuteFocusedConversations              bool          `json:"muteFocusedConversations"`
				NewMessageNotification                string        `json:"newMessageNotification"`
				NewRoomNotification                   string        `json:"newRoomNotification"`
				NotificationsSoundVolume              int           `json:"notificationsSoundVolume"`
				SaveMobileBandwidth                   bool          `json:"saveMobileBandwidth"`
				SendOnEnter                           string        `json:"sendOnEnter"`
				SidebarHideAvatar                     bool          `json:"sidebarHideAvatar"`
				SidebarShowDiscussion                 bool          `json:"sidebarShowDiscussion"`
				UnreadAlert                           bool          `json:"unreadAlert"`
				UseEmojis                             bool          `json:"useEmojis"`
			} `json:"preferences"`
		} `json:"settings"`
	} `json:"user"`
}

type SetStatusResponse

type SetStatusResponse struct {
	Status
}

type SetTopic

type SetTopic struct {
	RoomId string `json:"roomId"`
	Topic  string `json:"topic"`
}

type SetTopicIMResponse

type SetTopicIMResponse struct {
	Topic string
	Status
}

type SettingsConfigurations

type SettingsConfigurations struct {
	Configurations []interface{} `json:"configurations"`
	Status
}

type SettingsMessageResponse

type SettingsMessageResponse struct {
	Status
	models.SettingsMessage
}

type SettingsOauthResponse

type SettingsOauthResponse struct {
	Status
	Services []models.SettingsOauth `json:"services"`
}

type SettingsResponse

type SettingsResponse struct {
	Settings []models.SettingsPrivate `json:"settings"`
	// contains filtered or unexported fields
}

type SettingsUpdateResonse

type SettingsUpdateResonse struct {
	Status
}

type SpotlightResponse

type SpotlightResponse struct {
	Status
	models.Spotlight
}

type StatisticsListResponse

type StatisticsListResponse struct {
	Status
	models.StatisticsList
}

type StatisticsResponse

type StatisticsResponse struct {
	Status
	models.StatisticsInfo
}

type Status

type Status struct {
	Success bool   `json:"success"`
	Error   string `json:"error"`

	Status  string `json:"status"`
	Message string `json:"message"`
}

func (Status) OK

func (s Status) OK() error

type StatusResponse

type StatusResponse struct {
	Status
	Channel string `json:"channel"`
}

StatusResponse The base for the most of the json responses

type UnReadResp

type UnReadResp struct {
	Status
}

type UpdatePermissionsRequest

type UpdatePermissionsRequest struct {
	Permissions []models.Permission `json:"permissions"`
}

type UpdatePermissionsResponse

type UpdatePermissionsResponse struct {
	Status
	Permissions []models.Permission `json:"permissions"`
}

type UploadResponse

type UploadResponse struct {
	Status
	Message struct {
		ID   string    `json:"_id"`
		Rid  string    `json:"rid"`
		Ts   time.Time `json:"ts"`
		Msg  string    `json:"msg"`
		File struct {
			ID   string `json:"_id"`
			Name string `json:"name"`
			Type string `json:"type"`
		} `json:"file"`
		Attachments []struct {
			Ts                time.Time `json:"ts"`
			Title             string    `json:"title"`
			TitleLink         string    `json:"title_link"`
			TitleLinkDownload bool      `json:"title_link_download"`
			Type              string    `json:"type"`
			Description       string    `json:"description"`
		} `json:"attachments"`
		U struct {
			ID       string `json:"_id"`
			Username string `json:"username"`
			Name     string `json:"name"`
		} `json:"u"`
		UpdatedAt time.Time `json:"_updatedAt"`
	} `json:"message"`
}

type UserDeactivateIdleResponse

type UserDeactivateIdleResponse struct {
	Status
	Count int `json:"count"`
}

type UserDeleteOwnResponse

type UserDeleteOwnResponse struct {
	Status
}

type UserDeleteResponse

type UserDeleteResponse struct {
	Status
}

type UserGetAvatarResponse

type UserGetAvatarResponse struct {
	Status
}

type UserInviteToken

type UserInviteToken struct {
	Token string `json:"token"`
}

type UserInviteTokenResponse

type UserInviteTokenResponse struct {
	Room struct {
		Rid   string `json:"rid"`
		Fname string `json:"fname"`
		Name  string `json:"name"`
		T     string `json:"t"`
	} `json:"room"`
	Status
}

type UserPresenceResponse

type UserPresenceResponse struct {
	Status
	// UserPresence models.UserPresence
	Presence string `json:"presence"`
}

type UserResetAvatarResponse

type UserResetAvatarResponse struct {
	Status
}

type UsersInfoResponse

type UsersInfoResponse struct {
	Status
	UserInfo models.UserInfo `json:"user"`
}

type UsersListResponse

type UsersListResponse struct {
	Status
	UsersList []models.UsersList `json:"users"`
}

type ValidateInviteTokenResponse

type ValidateInviteTokenResponse struct {
	Valid bool `json:"valid"`
	Status
}

type VedieUpdateTimeoutResponse

type VedieUpdateTimeoutResponse struct {
	Status
	JitsiTimeout int64 `json:"jitsiTimeout"`
}

type WebdavGetAccountResponse

type WebdavGetAccountResponse struct {
	Status
	Accounts []struct {
		ID        string `json:"_id"`
		ServerURL string `json:"server_url"`
		Username  string `json:"username"`
		Name      string `json:"name"`
	} `json:"accounts"`
}

Jump to

Keyboard shortcuts

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