UnsplashCollections::photos()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 2
dl 0
loc 3
rs 10
1
<?php
2
3
namespace shweshi\LaravelUnsplashWrapper;
4
5
class UnsplashCollections extends BaseClass
6
{
7
    /**
8
     * Retrieve a single page from the list of all collections.
9
     *
10
     * @param array $params
11
     *
12
     * @return mixed
13
     */
14
    public function collections(array $params)
15
    {
16
        return $this->call('collections', $params);
17
    }
18
19
    /**
20
     * Retrieve a single page from the list of featured collections.
21
     *
22
     * @param array $params
23
     *
24
     * @return mixed
25
     */
26
    public function featured(array $params)
27
    {
28
        return $this->call('collections/featured', $params);
29
    }
30
31
    /**
32
     * Retrieve a single page from the list of curated collections.
33
     *
34
     * @param array $params
35
     *
36
     * @return mixed
37
     */
38
    public function curated(array $params)
39
    {
40
        return $this->call('collections/curated', $params);
41
    }
42
43
    /**
44
     * Retrieve a collection using id.
45
     *
46
     * @param string $id
47
     * @param array  $params
48
     *
49
     * @return mixed
50
     */
51
    public function single($id, array $params)
52
    {
53
        return $this->call('collections/'.$id, $params);
54
    }
55
56
    /**
57
     * Retrieve a collection’s photos.
58
     *
59
     * @param string $id
60
     * @param array  $params
61
     *
62
     * @return mixed
63
     */
64
    public function photos($id, array $params)
65
    {
66
        return $this->call('collections/'.$id.'photos', $params);
67
    }
68
69
    /**
70
     * Retrieve a list of collections related to this one.
71
     *
72
     * @param string $id
73
     * @param array  $params
74
     *
75
     * @return mixed
76
     */
77
    public function related($id, array $params)
78
    {
79
        return $this->call('collections/'.$id.'related', $params);
80
    }
81
}
82