Passed
Push — master ( b8b318...ae3161 )
by Dmitry
13:51
created

Video   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 6
c 1
b 0
f 0
dl 0
loc 24
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A videoAdInfo() 0 10 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Promopult\TikTokMarketingApi\Service;
6
7
use Promopult\TikTokMarketingApi\AbstractService;
8
9
final class Video extends AbstractService
10
{
11
    /**
12
     * Get video information
13
     *
14
     * Use this endpoint to get the information about a list of videos from the TikTok creative library.
15
     *
16
     * @param int $advertiserId Advertiser ID
17
     * @param array $videoIds   Video ID list. Up to 60 IDs per request
18
     *
19
     * @return array
20
     *
21
     * @throws \Throwable
22
     */
23
    public function videoAdInfo(
24
        int $advertiserId,
25
        array $videoIds
26
    ): array {
27
        return $this->requestApi(
28
            'GET',
29
            '/open_api/v1.2/file/video/ad/info/',
30
            [
31
                'advertiser_id' => $advertiserId,
32
                'video_ids' => $videoIds
33
            ]
34
        );
35
    }
36
}
37