Skip to content
This repository has been archived by the owner on Oct 29, 2024. It is now read-only.

Commit

Permalink
Pr dev1 (#7)
Browse files Browse the repository at this point in the history
* feat(douyin): ✨ 获取粉丝列表

* feat(douyin): ✨ 获取视频列表
  • Loading branch information
waset authored Apr 18, 2022
1 parent 44d719a commit 9623b9b
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
32 changes: 32 additions & 0 deletions src/Douyin/Fans.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php

namespace Waset\Douyin;

class Fans extends Application
{
/**
* 获取粉丝列表
*
* @param string $access_token
* @param string $openid
* @param integer $cursor
* @param integer $count
* @return Fans
*/
public function list(string $access_token, string $openid, int $cursor = 0, int $count = 20)
{
$api_url = self::BaseUrl . '/fans/list/';

$headers = [
"access-token: ${access_token}",
'Content-Type: application/json',
];
$params = [
'open_id' => $openid,
"cursor" => $cursor,
"count" => $count
];

return $this->https_get($api_url, $params, $headers);
}
}
32 changes: 32 additions & 0 deletions src/Douyin/Video.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php

namespace Waset\Douyin;

class Video extends Application
{
/**
* 获取粉丝列表
*
* @param string $access_token
* @param string $openid
* @param integer $cursor
* @param integer $count
* @return Video
*/
public function list(string $access_token, string $openid, int $cursor = 0, int $count = 20)
{
$api_url = self::BaseUrl . '/video/list/';

$headers = [
"access-token: ${access_token}",
'Content-Type: application/json',
];
$params = [
'open_id' => $openid,
"cursor" => $cursor,
"count" => $count
];

return $this->https_get($api_url, $params, $headers);
}
}

0 comments on commit 9623b9b

Please sign in to comment.