Completed
Push — master ( 0afe29...1d6efb )
by WEBEWEB
01:12
created

SearchVideosRequest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 8

Importance

Changes 0
Metric Value
dl 0
loc 33
c 0
b 0
f 0
wmc 2
lcom 0
cbo 8
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getResourcePath() 0 3 1
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\Model\Request;
13
14
use WBW\Library\Pexels\Model\AbstractRequest;
15
use WBW\Library\Pexels\Traits\MaxDurationTrait;
16
use WBW\Library\Pexels\Traits\MaxWidthTrait;
17
use WBW\Library\Pexels\Traits\MinDurationTrait;
18
use WBW\Library\Pexels\Traits\MinWidthTrait;
19
use WBW\Library\Pexels\Traits\PageTrait;
20
use WBW\Library\Pexels\Traits\PerPageTrait;
21
use WBW\Library\Pexels\Traits\QueryTrait;
22
23
/**
24
 * Search videos request.
25
 *
26
 * @author webeweb <https://github.com/webeweb/>
27
 * @package WBW\Library\Pexels\Model\Request
28
 */
29
class SearchVideosRequest extends AbstractRequest {
30
31
    use MinDurationTrait;
32
    use MinWidthTrait;
33
    use MaxDurationTrait;
34
    use MaxWidthTrait;
35
    use PageTrait;
36
    use PerPageTrait;
37
    use QueryTrait;
38
39
    /**
40
     * Search videos resource path.
41
     *
42
     * @var string
43
     */
44
    const SEARCH_VIDEOS_RESOURCE_PATH = "/videos/search";
45
46
    /**
47
     * Constructor.
48
     */
49
    public function __construct() {
50
        parent::__construct();
51
        $this->setPage(1);
52
        $this->setPerPage(15);
53
    }
54
55
    /**
56
     * {@inheritDoc}
57
     */
58
    public function getResourcePath() {
59
        return self::SEARCH_VIDEOS_RESOURCE_PATH;
60
    }
61
}
62