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

SearchPhotosRequest::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
c 0
b 0
f 0
rs 10
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\Model\Request;
13
14
use WBW\Library\Pexels\Model\AbstractRequest;
15
use WBW\Library\Pexels\Traits\PageTrait;
16
use WBW\Library\Pexels\Traits\PerPageTrait;
17
use WBW\Library\Pexels\Traits\QueryTrait;
18
19
/**
20
 * Search photos request.
21
 *
22
 * @author webeweb <https://github.com/webeweb/>
23
 * @package WBW\Library\Pexels\Model\Request
24
 */
25
class SearchPhotosRequest extends AbstractRequest {
26
27
    use PageTrait;
28
    use PerPageTrait;
29
    use QueryTrait;
30
31
    /**
32
     * Search photos resource path.
33
     *
34
     * @var string
35
     */
36
    const SEARCH_PHOTOS_RESOURCE_PATH = "/v1/search";
37
38
    /**
39
     * Constructor.
40
     */
41
    public function __construct() {
42
        parent::__construct();
43
        $this->setPage(1);
44
        $this->setPerPage(15);
45
    }
46
47
    /**
48
     * {@inheritDoc}
49
     */
50
    public function getResourcePath() {
51
        return self::SEARCH_PHOTOS_RESOURCE_PATH;
52
    }
53
}
54