12345678910111213141516171819202122232425262728293031323334353637 |
- <?php
- namespace App\Http\Controllers\Api;
- use App\Service\AccessTokenService;
- use App\Support\DouYinApi;
- use Illuminate\Http\Request;
- use App\Http\Controllers\Controller;
- class TestController extends Controller
- {
- public function getToken() {
- $appId = 'tt5a212c9cc51102a601';
- // $responseData = DouYinApi::getClientToken($appId);
- $responseData = DouYinApi::getAccessToken($appId);
- return self::returnValue($responseData);
- }
- public function getVideoStatus(Request $request) {
- $appId = 'tt5a212c9cc51102a601';
- $openVideoId = $request->input('open_video_id');
- if(!empty($openVideoId)) {
- $responseData = DouYinApi::queryVideo($appId, 1, $openVideoId, null);
- }
- return $responseData ?? [];
- }
- public function getAlbumStatus(Request $request) {
- $appId = 'tt5a212c9cc51102a601';
- $albumId = $request->input('album_id');
- if(!empty($albumId)) {
- $responseData = DouYinApi::queryAlbum();
- }
- }
- }
|