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

Video::videoAdInfo()   A

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
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