Video::videoAdInfo()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

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