Commit 95ec28f3 authored by 夏彬's avatar 夏彬

添加消息相关的api

parent fb38395c
......@@ -44,4 +44,48 @@ class Message extends Client
return self::call('message.sendSmsByUid', compact('uid', 'content', 'signature'));
}
/***
* @param $userId
* @param $title
* @param $sourceUrl
* @param $from 0:xue 1:bbs 2:s
* @param $type 0:评论 1:帖子
* @param $commentId
* @param $replyUserId
* @param string $replyedComment
* @return mixed
*/
public static function addComment($userId, $title, $sourceUrl, $from, $type, $commentId, $replyUserId, $replyedComment = ''){
return self::call('message.addComment', compact('userId,', 'title', 'sourceUrl', 'from', 'type', 'commentId', 'replyUserId', 'replyedComment'));
}
/**
* @param $userId
* @param $title
* @param $sourceUrl
* @param $from
* @param $type
* @param $sourceId 点赞的评论id
* @param $likeUserId
* @param $likedComment
* @return mixed
*/
public static function addLike($userId, $title, $sourceUrl, $from, $type, $sourceId, $likeUserId, $likedComment){
return self::call('message.addLike', compact('userId,', 'title', 'sourceUrl', 'from', 'type', 'sourceId', 'likeUserId', 'likedComment'));
}
/**
* @param $userId
* @param $title
* @param $desc
* @param $from
* @param $type
* @param string $content
* @param int $toUser 0系统消息其它为用户id,多个用户id数组
* @return mixed
*/
public static function add($userId, $title, $desc, $from, $type, $content = '', $toUser = 0){
return self::call('message.add','userId', 'title', 'desc', 'from', 'type', 'content', 'toUser');
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment