Documentation ¶
Index ¶
- Constants
- func ResponseResult(appkey string, appSecret string, action string, params url.Values) ([]byte, error)
- type AddResult
- type AddrResult
- type BaseResp
- type BatchChatroomResult
- type BlackAndMuteList
- type Broadcast
- type BroadcastMsg
- type Chatroom
- func (chatroom *Chatroom) AddRobot(roomid int64, accids string, roleExt string, notifyExt string) (*RobotResult, error)
- func (chatroom *Chatroom) Create(creator string, name string, announcement string, broadcasturl string, ...) (*ChatroomResult, error)
- func (chatroom *Chatroom) Get(romid int64, needOnlineUserCount bool) (*ChatroomDetailInfoResult, error)
- func (chatroom *Chatroom) GetBatch(roomids string, needOnlineUserCount bool) (*BatchChatroomResult, error)
- func (chatroom *Chatroom) RemoveRobot(roomid int64, accids string) (*RobotResult, error)
- func (chatroom *Chatroom) RequestAddr(roomid int64, accid string, clienttype int) (*AddrResult, error)
- func (chatroom *Chatroom) SendMsg(roomid int64, msgId string, fromAccid string, msgType int, resendFlag int, ...) (*ChatroomSendMsgResult, error)
- func (chatroom *Chatroom) SetMemberRole(roomid int64, operator string, target string, opt int, optvalue bool, ...) (*SetMemberResult, error)
- func (chatroom *Chatroom) ToggleCloseStat(roomid int64, operator string, valid bool) (*ToggleCloseStatResutl, error)
- func (chatroom *Chatroom) Update(roomid int64, name string, announcement string, broadcasturl string, ...) (*ChatroomResult, error)
- type ChatroomDetailInfo
- type ChatroomDetailInfoResult
- type ChatroomInfo
- type ChatroomResult
- type ChatroomSendMsgResult
- type CreateResult
- type Data
- type Exceed
- type Friend
- func (this *Friend) AddFriend(accid string, faccid string, friendType int, msg string) (*BaseResp, error)
- func (this *Friend) DeleeteFriend(accid, faccid string) (*BaseResp, error)
- func (this *Friend) GetFriendList(accid string, updateTime int64) (*FriendInfoResponse, error)
- func (this *Friend) ListBlackAndMuteList(accid string) (*BlackAndMuteList, error)
- func (this *Friend) SetSpecialRelation(accid string, targetAcc string, relationType int, value int) (*BaseResp, error)
- func (this *Friend) UpdateFriend(accid, faccid, alias, ex string) (*BaseResp, error)
- type FriendInfo
- type FriendInfoResponse
- type Info
- type JoinTeamResult
- type Msg
- func (msg *Msg) Broadcast(body string, from string, isOffline bool, ttl int, targetOs string) (*Broadcast, error)
- func (msg *Msg) Recall(deleteMsgid string, timetag string, msgType int, ...) (*BaseResp, error)
- func (msg *Msg) SendAttachMsg(from string, msgType int, to string, attach string, pushcontent string, ...) (*BaseResp, error)
- func (msg *Msg) SendBatchAttachMsg(fromAccid string, toAccids string, attach string, pushcontent string, ...) (*SendResult, error)
- func (msg *Msg) SendBatchMsg(fromAccid string, toAccids string, msgType int, body string, option string, ...) (*SendResult, error)
- func (msg *Msg) SendMsg(from string, ope int, to string, msgType int, body string, antispam bool, ...) (*SendResult, error)
- func (msg *Msg) Upload(content []byte, fileType string, isHttps bool) (*UploadResult, error)
- func (msg *Msg) UploadByMultiPart(content []byte, fileType string, isHttps bool) (*UploadResult, error)
- type Mute
- type MuteResult
- type Nim
- type QueryDetailResult
- type QueryResult
- type ReadInfo
- type ReadInfoResult
- type RobotDesc
- type RobotResult
- type SendBatchResutl
- type SendMsgResult
- type SendResult
- type SetMember
- type SetMemberResult
- type TDetailInfo
- type Team
- func (team *Team) Add(tid string, owner string, members string, magree int, msg string, ...) (*AddResult, error)
- func (team *Team) AddManager(tid, owner, members string) (*BaseResp, error)
- func (team *Team) ChangetOwner(tid string, owner string, newowner string, leave int) (*BaseResp, error)
- func (team *Team) Create(tname string, owner string, members string, announcement string, intro string, ...) (*CreateResult, error)
- func (team *Team) GetMarkReadInfo(tid int64, msgId int64, fromAccid string, snapshot bool) (*ReadInfoResult, error)
- func (team *Team) JoinTeams(accid string) (*TeamInfo, error)
- func (team *Team) Kick(tid, owner, member, members, attach string) (*BaseResp, error)
- func (team *Team) Leave(tid, accid string) (*BaseResp, error)
- func (team *Team) ListTeamMute(tid, owner string) (*MuteResult, error)
- func (team *Team) MuteTeam(tid string, accid string, ope int) (*BaseResp, error)
- func (team *Team) MuteTeamList(tid string, owner string, accid string, mute int) (*BaseResp, error)
- func (team *Team) MuteTeamListAll(tid string, owner string, mute bool, muteType int) (*BaseResp, error)
- func (team *Team) Query(tids string, ope int) (*QueryResult, error)
- func (team *Team) QueryDetail(tid int64) (*TDetailInfo, error)
- func (team *Team) Remove(tid, owner string) (*BaseResp, error)
- func (team *Team) RemoveManager(tid, owner, members string) (*BaseResp, error)
- func (team *Team) Update(tid string, tname string, owner string, announcement string, intro string, ...) (*BaseResp, error)
- func (team *Team) UpdateTeamNick(tid, owner, accid, nick, custom string) (*BaseResp, error)
- type TeamInfo
- type TeamMember
- type Tinfo
- type ToggleCloseStatResutl
- type TokenInfo
- type TokenRespose
- type Uinfos
- type UploadResult
- type User
- func (this *User) Block(accid string) (*BaseResp, error)
- func (this *User) Create(accid string) (*TokenRespose, error)
- func (this *User) GetUinfo(accids []string) (*Uinfos, error)
- func (this *User) RefreshToken(accid string) (*TokenRespose, error)
- func (this *User) SetDonnop(accid string, donnopOpen bool) (*BaseResp, error)
- func (this *User) UnBlock(accid string) (*BaseResp, error)
- func (this *User) Update(accid, props, token string) (*BaseResp, error)
- func (this *User) UpdateUinfo(gender int, accid, name, icon, sign, email, birth, mobile, ex string) (*BaseResp, error)
Constants ¶
View Source
const ( BASE_URL = "https://api.netease.im/nimserver/" ACTION_USER_CREATE = BASE_URL + "user/create.action" // 创建云通信ID ACTION_USER_UPDATE = BASE_URL + "user/update.action" // 更新云通信ID ACTION_USER_REFRESH_TOKEN = BASE_URL + "user/refreshToken.action" // 更新并获取token ACTION_USER_BLOCK = BASE_URL + "user/block.action" // 封禁网易云通信ID ACTION_USER_UNBLOCK = BASE_URL + "user/unblock.action" // 解禁网易云通信ID ACTION_USER_DONNOP_OPEN = BASE_URL + "user/setDonnop.action" // 设置桌面端在线时,移动端是否需要推送 ACTION_USER_UPDATE_UINFO = BASE_URL + "user/updateUinfo.action" // 更新用户名片 ACTION_USER_GET_UINFO = BASE_URL + "user/getUinfos.action" // 获取用户名片 ACTION_USER_SET_SPECIAL_RELATION = BASE_URL + "user/setSpecialRelation.action" // 设置黑名单/静音 ACTION_USER_LIST_BLACK_AND_MUTE_LIST = BASE_URL + "user/listBlackAndMuteList.action" // 查看指定用户的黑名单和静音列表 ACTION_FRIEND_ADD = BASE_URL + "friend/add.action" // 加好友 ACTION_FRIEND_UPDATE = BASE_URL + "friend/update.action" // 更新好友相关信息 ACTION_FRIEND_DELETE = BASE_URL + "friend/delete.action" // 删除好友 ACTION_FRIEND_GET = BASE_URL + "friend/get.action" // 获取好友关系 ACTION_MSG_SNED_MSG = BASE_URL + "msg/sendMsg.action" // 发送普通消息 ACTION_MSG_SNED_BATCH_MSG = BASE_URL + "msg/sendBatchMsg.action" // 批量发送点对点普通消息 ACTION_MSG_SEND_ATTACH_MSG = BASE_URL + "msg/sendAttachMsg.action" // 发送自定义系统通知 ACTION_MSG_SEND_BATCH_ATTACH_MSG = BASE_URL + "msg/sendBatchAttachMsg.action" // 批量发送点对点自定义系统通知 ACTION_MSG_UPLOAD = BASE_URL + "msg/upload.action" // 文件上传 ACTION_MSG_UPLOAD_MULTIPART = BASE_URL + "msg/fileUpload.action" // 文件上传 multipart 方式 ACTION_MSG_RECALL = BASE_URL + "msg/recall.action" // 消息撤回 ACTION_MSG_BROADCAST = BASE_URL + "broadcastMsg.action" ACTION_TEAM_CREATE = BASE_URL + "team/create.action" // 创建群 ACTION_TEAM_ADD = BASE_URL + "team/add.action" // 拉人入群 ACTION_TEAM_KICK = BASE_URL + "team/kick.action" // 踢人出群 ACTION_TEAM_REMOVE = BASE_URL + "team/remove.action" // 解散群 ACTION_TEAM_UPDATE = BASE_URL + "team/update.action" // 编辑群资料 ACTION_TEAM_QUERY = BASE_URL + "team/query.action" // 群信息与成员列表查询 ACTION_TEAM_QUERY_DETAIL = BASE_URL + "team/queryDetail.action" // 获取群组详细信息 ACTION_TEAM_GET_MARK_READ_INFO = BASE_URL + "team/getMarkReadInfo.action" // 获取群组已读消息的已读详情信息 ACTION_TEAM_CHANGE_OWNER = BASE_URL + "team/changeOwner.action" // 移交群主 ACTION_TEAM_ADD_MANAGER = BASE_URL + "team/addManager.action" // 任命管理员 ACTION_TEAM_REMOVE_MANAGER = BASE_URL + "team/removeManager.action" // 移除管理员 ACTION_TEAM_JOIN_TEAM = BASE_URL + "team/joinTeams.action" // 获取某用户所加入的群信息 ACTION_TEAM_UPDATE_TEAM_NICK = BASE_URL + "team/updateTeamNick.action" // 修改群昵称 ACTION_TEAM_MUTE = BASE_URL + "team/muteTeam.action" // 修改消息提醒开关 ACTION_TEAM_MUTE_LIST = BASE_URL + "team/muteTlist.action" // 禁言群成员 ACTION_TEAM_LEAVE = BASE_URL + "team/leave.action" // 主动退群 ACTION_TEAM_MUTE_ALL = BASE_URL + "team/muteTlistAll.action" // 将群组整体禁言 ACTION_TEAM_LIST_TEAM_MUTE = BASE_URL + "team/listTeamMute.action" // 获取群组禁言列表 ACTION_CHATROOM_CREATE = BASE_URL + "chatroom/create.action" // 创建聊天室 ACTION_CHATROOM_GET = BASE_URL + "chatroom/get.action" // 查询聊天室信息 ACTION_CHATROOM_GET_BATCH = BASE_URL + "chatroom/getBatch.action" // 批量查询聊天室信息 ACTION_CHATROOM_UPDATE = BASE_URL + "chatroom/update.action" // 更新聊天室信息 ACTION_CHATROOM_TOGGLE_CLOSE_STAT = BASE_URL + "chatroom/toggleCloseStat.action" // 修改聊天室开/关闭状态 ACTION_CHATROOM_SET_MEMBER_ROLE = BASE_URL + "chatroom/setMemberRole.action" // 设置聊天室内用户角色 ACTION_CHATROOM_REQUEST_ADDR = BASE_URL + "chatroom/requestAddr.action" // 请求聊天室地址 ACTION_CHATROOM_SEND_MSG = BASE_URL + "chatroom/sendMsg.action" // 发送聊天室消息 ACTION_CHATROOM_ADD_ROBOT = BASE_URL + "chatroom/addRobot.action" // 往聊天室内添加机器人 ACTION_CHATROOM_REMOVE_ROBOT = BASE_URL + "chatroom/removeRobot.action" // 从聊天室内删除机器人 ACTION_CHATROOM_TEMPORARY_MUTE = BASE_URL + "chatroom/temporaryMute.action" // 设置临时禁言状态 ACTION_CHATROOM_QUEUE_OFFER = BASE_URL + "chatroom/queueOffer.action" // 往聊天室有序队列中新加或更新元素 ACTION_CHATROOM_QUEUE_POLL = BASE_URL + "chatroom/queuePoll.action" // 从队列中取出元素 ACTION_CHATROOM_QUEUE_LIST = BASE_URL + "chatroom/queueList.action" // 排序列出队列中所有元素 ACTION_CHATROOM_QUEUE_DROP = BASE_URL + "chatroom/queueDrop.action" // 删除清理整个队列 ACTION_CAHTROOM_QUEUE_INIT = BASE_URL + "chatroom/queueInit.action" // 初始化队列 ACTION_CHATROOM_MUTE_ROOM = BASE_URL + "chatroom/muteRoom.action" // 将聊天室整体禁言 ACTION_CHATROOM_TOPN = BASE_URL + "chatroom/topn.action" // 查询聊天室统计指标TopN ACTION_CHATROOM_MEMBERS_BY_PAGE = BASE_URL + "chatroom/membersByPage.action" // 分页获取成员列表 ACTION_CHATROOM_QUERY_MEMBERS = BASE_URL + "chatroom/queryMembers.action" // 批量获取在线成员信息 ACTION_CHATROOM_UPDATE_MY_ROOM_ROLE = BASE_URL + "chatroom/updateMyRoomRole.action" // 变更聊天室内的角色信息 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AddrResult ¶
type BatchChatroomResult ¶
type BatchChatroomResult struct { BaseResp NoExistRooms []int64 `json:"noExistRooms"` FailRooms []int64 `json:"failRooms"` SuccRooms []ChatroomDetailInfo `json:"succRooms"` }
type BlackAndMuteList ¶
type Broadcast ¶
type Broadcast struct { BaseResp BroadcastMsg `json:"msg"` }
type BroadcastMsg ¶
type Chatroom ¶
func (*Chatroom) AddRobot ¶
func (chatroom *Chatroom) AddRobot(roomid int64, accids string, roleExt string, notifyExt string) (*RobotResult, error)
AddRobot ...
func (*Chatroom) Create ¶
func (chatroom *Chatroom) Create(creator string, name string, announcement string, broadcasturl string, ext string, queuelevel int) (*ChatroomResult, error)
Create ...
func (*Chatroom) Get ¶
func (chatroom *Chatroom) Get(romid int64, needOnlineUserCount bool) (*ChatroomDetailInfoResult, error)
Get ...
func (*Chatroom) GetBatch ¶
func (chatroom *Chatroom) GetBatch(roomids string, needOnlineUserCount bool) (*BatchChatroomResult, error)
GetBatch ...
func (*Chatroom) RemoveRobot ¶
func (chatroom *Chatroom) RemoveRobot(roomid int64, accids string) (*RobotResult, error)
RemoveRobot ...
func (*Chatroom) RequestAddr ¶
func (chatroom *Chatroom) RequestAddr(roomid int64, accid string, clienttype int) (*AddrResult, error)
name ...
func (*Chatroom) SendMsg ¶
func (chatroom *Chatroom) SendMsg(roomid int64, msgId string, fromAccid string, msgType int, resendFlag int, attach string, ext string, antispam string, antispamCustom string, skipHistory int, bid string, highPriority bool, useYidun int, needHighPriorityMsgResend bool) (*ChatroomSendMsgResult, error)
SendMsg ...
func (*Chatroom) SetMemberRole ¶
func (chatroom *Chatroom) SetMemberRole(roomid int64, operator string, target string, opt int, optvalue bool, notifyExt string) (*SetMemberResult, error)
SetMemberRole ...
func (*Chatroom) ToggleCloseStat ¶
func (chatroom *Chatroom) ToggleCloseStat(roomid int64, operator string, valid bool) (*ToggleCloseStatResutl, error)
name ...
type ChatroomDetailInfo ¶
type ChatroomDetailInfo struct { Roomid int `json:"roomid"` Valid bool `json:"valid"` Muted bool `json:"muted"` Announcement string `json:"announcement"` Name string `json:"name"` Broadcasturl string `json:"broadcasturl"` Onlineusercount int `json:"onlineusercount"` Ext string `json:"ext"` Creator string `json:"creator"` Queuelevel int `json:"queuelevel"` }
type ChatroomDetailInfoResult ¶
type ChatroomDetailInfoResult struct { BaseResp ChatroomDetailInfo ChatroomDetailInfo `json:"chatroom"` }
type ChatroomInfo ¶
type ChatroomResult ¶
type ChatroomResult struct { BaseResp ChatroomInfo ChatroomInfo `json:"chatroom"` }
type ChatroomSendMsgResult ¶
type ChatroomSendMsgResult struct { BaseResp Desc SendMsgResult `json:"desc"` }
type CreateResult ¶
type Friend ¶
func (*Friend) AddFriend ¶
func (this *Friend) AddFriend(accid string, faccid string, friendType int, msg string) (*BaseResp, error)
AddFriend ...
func (*Friend) DeleeteFriend ¶
DeleeteFriend ...
func (*Friend) GetFriendList ¶
func (this *Friend) GetFriendList(accid string, updateTime int64) (*FriendInfoResponse, error)
GetFriendList ...
func (*Friend) ListBlackAndMuteList ¶
func (this *Friend) ListBlackAndMuteList(accid string) (*BlackAndMuteList, error)
ListBlackAndMuteList ...
type FriendInfo ¶
type FriendInfoResponse ¶
type FriendInfoResponse struct { BaseResp Size int `json:"size"` Friends []FriendInfo `json:"friends"` }
type JoinTeamResult ¶
type Msg ¶
func (*Msg) Broadcast ¶
func (msg *Msg) Broadcast(body string, from string, isOffline bool, ttl int, targetOs string) (*Broadcast, error)
Broadcast ...
func (*Msg) Recall ¶
func (msg *Msg) Recall(deleteMsgid string, timetag string, msgType int, from, to, msgDesc, ignoreTime string) (*BaseResp, error)
MsgRecall ...
func (*Msg) SendAttachMsg ¶
func (msg *Msg) SendAttachMsg(from string, msgType int, to string, attach string, pushcontent string, payload string, sound string, save int, option string) (*BaseResp, error)
SendAttachMsg ...
func (*Msg) SendBatchAttachMsg ¶
func (msg *Msg) SendBatchAttachMsg(fromAccid string, toAccids string, attach string, pushcontent string, payload string, sound string, save int, option string) (*SendResult, error)
SendBatchAttachMsg ...
func (*Msg) SendBatchMsg ¶
func (msg *Msg) SendBatchMsg(fromAccid string, toAccids string, msgType int, body string, option string, pushcontent string, payload string, ext string, bid string, useYidun int) (*SendResult, error)
SendBatchMsg ...
func (*Msg) SendMsg ¶
func (msg *Msg) SendMsg(from string, ope int, to string, msgType int, body string, antispam bool, antispamCustom string, option string, pushcontent string, payload string, ext string, forcepushlist string, forcepushcontent string, forcepushall string, bid string, useYidun int, markRead int) (*SendResult, error)
SendMsg ...
func (*Msg) UploadByMultiPart ¶
func (msg *Msg) UploadByMultiPart(content []byte, fileType string, isHttps bool) (*UploadResult, error)
MsgUpload ...
type MuteResult ¶
type QueryDetailResult ¶
type QueryDetailResult struct { BaseResp TDetailInfo `json:"tinfo"` }
type QueryResult ¶
type ReadInfoResult ¶
type RobotResult ¶
type SendBatchResutl ¶
type SendMsgResult ¶
type SendMsgResult struct { Time string `json:"time"` FromAvator string `json:"fromAvator"` Msgid_client string `json:"msgid_client"` FromClientType string `json:"fromClientType"` Attach string `json:"attach"` RoomId string `json:"roomId"` FromAccount string `json:"fromAccount"` FromNick string `json:"fromNick"` Type string `json:"type"` Ext string `json:"ext"` HighPriorityFlag int `json:"highPriorityFlag"` }
type SendResult ¶
type SetMemberResult ¶
type TDetailInfo ¶
type TDetailInfo struct { Icon string `json:"icon"` Announcement string `json:"announcement"` Uptinfomode int `json:"uptinfomode"` Maxusers int `json:"maxusers"` Intro string `json:"intro"` Upcustommode int `json:"upcustommode"` Tname string `json:"tname"` Beinvitemode int `json:"beinvitemode"` Joinmode int `json:"joinmode"` Tid int `json:"tid"` Invitemode int `json:"invitemode"` Mute bool `json:"mute"` Custom string `json:"custom"` ClientCustom string `json:"clientCustom"` Createtime int64 `json:"createtime"` Updatetime int64 `json:"updatetime"` Owner TeamMember `json:"owner"` Admins []TeamMember `json:"admins"` Members []TeamMember `json:"members"` }
type Team ¶
func (*Team) Add ¶
func (team *Team) Add(tid string, owner string, members string, magree int, msg string, attach string) (*AddResult, error)
Add ...
func (*Team) AddManager ¶
AddManager ...
func (*Team) ChangetOwner ¶
func (team *Team) ChangetOwner(tid string, owner string, newowner string, leave int) (*BaseResp, error)
ChangetOwner ...
func (*Team) Create ¶
func (team *Team) Create(tname string, owner string, members string, announcement string, intro string, msg string, magree int, joinmode int, custom string, icon string, beinvitemode int, invitemode int, uptinfomode int, upcustommode int) (*CreateResult, error)
Create ...
func (*Team) GetMarkReadInfo ¶
func (team *Team) GetMarkReadInfo(tid int64, msgId int64, fromAccid string, snapshot bool) (*ReadInfoResult, error)
GetMarkReadInfo ...
func (*Team) ListTeamMute ¶
func (team *Team) ListTeamMute(tid, owner string) (*MuteResult, error)
ListTeamMute ...
func (*Team) MuteTeamList ¶
MuteTeamList ...
func (*Team) MuteTeamListAll ¶
func (team *Team) MuteTeamListAll(tid string, owner string, mute bool, muteType int) (*BaseResp, error)
MuteTeamListAll ...
func (*Team) QueryDetail ¶
func (team *Team) QueryDetail(tid int64) (*TDetailInfo, error)
QueryDetail ...
func (*Team) RemoveManager ¶
RemoveManager ...
type TeamMember ¶
type Tinfo ¶
type Tinfo struct { Tname string `json:"tname"` Announcement string `json:"announcement"` Owner string `json:"owner"` Maxusers int `json:"maxusers"` Joinmode int `json:"joinmode"` Tid int `json:"tid"` Intro string `json:"intro"` Size int `json:"size"` Custom string `json:"custom"` ClientCustom string `json:"clientCustom"` Mute bool `json:"mute"` Createtime int64 `json:"createtime"` Updatetime int64 `json:"updatetime"` Admins []string `json:"admins"` Members []string `json:"members"` }
type ToggleCloseStatResutl ¶
type ToggleCloseStatResutl struct { BaseResp ChatroomInfo ChatroomInfo `json:"desc"` }
type TokenRespose ¶
type UploadResult ¶
Click to show internal directories.
Click to hide internal directories.