Skip to content

Commit

Permalink
更新了朋友圈的操作接口
Browse files Browse the repository at this point in the history
  • Loading branch information
周先生 authored and 周先生 committed Dec 26, 2018
1 parent 436768c commit 51c3fe5
Showing 1 changed file with 22 additions and 12 deletions.
34 changes: 22 additions & 12 deletions src/Api.php
Original file line number Diff line number Diff line change
Expand Up @@ -640,38 +640,49 @@ public function setUserLabels($user, $ids)
}

/**
* 查看朋友圈
* @param string $last_id 用作翻页
* 查看朋友圈动态
* @param string $md5_page
* @param string $last_id
* @return mixed
* @throws RequestException
*/
public function snsTimeLine($md5_page = '', $last_id = '')
{
return $this->post(__FUNCTION__, compact('md5_page', 'last_id'));
}

/**
* 同步朋友圈
* @return mixed
* @throws RequestException
*/
public function snsTimeLine($last_id = '')
public function syncSns()
{
return $this->post(__FUNCTION__, compact('last_id'));
return $this->post(__FUNCTION__);
}

/**
* 查看好友的朋友圈
* @param $user
* @param string $last_id
* @param $md5_page
* @param string $max_id
* @return mixed
* @throws RequestException
*/
public function snsUserPage($user, $last_id = '')
public function getUserSns($user, $md5_page, $max_id = '')
{
return $this->post(__FUNCTION__, compact('last_id', 'user'));
return $this->post(__FUNCTION__, compact('user', 'md5_page', 'max_id'));
}

/**
* 朋友圈上传图片
* @param $image
* @param $size
* @return mixed
* @throws RequestException
*/
public function snsUpload($image, $size)
public function uploadImageSns($image)
{
return $this->post(__FUNCTION__, compact('image', 'size'));
return $this->post(__FUNCTION__, compact('image'));
}

/**
Expand All @@ -694,9 +705,8 @@ public function snsOp($id, $type, $comment, $comment_type)
* @return mixed
* @throws RequestException
*/
public function snsSendMoment($content)
public function sendSns($content)
{
$content = rawurlencode($content);
return $this->post(__FUNCTION__, compact('content'));
}

Expand Down

0 comments on commit 51c3fe5

Please sign in to comment.