Completed
Push — master ( 026ae8...9deabe )
by WEBEWEB
01:12
created

SearchVideosRequest::getResourcePath()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
/*
4
 * This file is part of the pexels-library package.
5
 *
6
 * (c) 2019 WEBEWEB
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace WBW\Library\Pexels\Request;
13
14
use WBW\Library\Core\Model\Attribute\IntegerPageTrait;
15
use WBW\Library\Core\Model\Attribute\StringQueryTrait;
16
use WBW\Library\Pexels\Model\Attribute\IntegerMaxDurationTrait;
17
use WBW\Library\Pexels\Model\Attribute\IntegerMaxWidthTrait;
18
use WBW\Library\Pexels\Model\Attribute\IntegerMinDurationTrait;
19
use WBW\Library\Pexels\Model\Attribute\IntegerMinWidthTrait;
20
use WBW\Library\Pexels\Model\Attribute\IntegerPerPageTrait;
21
22
/**
23
 * Search videos request.
24
 *
25
 * @author webeweb <https://github.com/webeweb/>
26
 * @package WBW\Library\Pexels\Request
27
 */
28
class SearchVideosRequest extends AbstractRequest {
29
30
    use IntegerMinDurationTrait;
31
    use IntegerMinWidthTrait;
32
    use IntegerMaxDurationTrait;
33
    use IntegerMaxWidthTrait;
34
    use IntegerPageTrait;
35
    use IntegerPerPageTrait;
36
    use StringQueryTrait;
37
38
    /**
39
     * Search videos resource path.
40
     *
41
     * @var string
42
     */
43
    const SEARCH_VIDEOS_RESOURCE_PATH = "/videos/search";
44
45
    /**
46
     * Constructor.
47
     */
48
    public function __construct() {
49
        parent::__construct();
50
        $this->setPage(1);
51
        $this->setPerPage(self::PER_PAGE_DEFAULT);
52
    }
53
54
    /**
55
     * {@inheritDoc}
56
     */
57
    public function getResourcePath(): string {
58
        return self::SEARCH_VIDEOS_RESOURCE_PATH;
59
    }
60
}
61