Completed
Push — master ( 3efda9...d6329d )
by Grzegorz
02:38
created

ControllerRequest::getPeople()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 5
rs 9.4286
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
3
namespace ComicVine\Api\Controllers;
4
5
/**
6
 * Define all requests to ComicVine API. Each request
7
 * should have configured filters and part of URL.
8
 *
9
 * Class ControllerRequest
10
 *
11
 * @package grzgajda/comicvine-api
12
 * @author  Grzegorz Gajda <[email protected]>
13
 */
14
class ControllerRequest extends ControllerRequestAbstract
15
{
16
17
    /**
18
     * Get all characters from ComicVine.
19
     *
20
     * @return \ComicVine\Api\Controllers\ControllerQuery
21
     * @throws \ComicVine\Exceptions\EmptyControllerRequestUrl
22
     */
23
    public function getCharacters()
24
    {
25
        return $this->setFilters(true, true, true, true)
26
            ->setUrl('/characters');
27
    }
28
29
    /**
30
     * Get all chats from ComicVine.
31
     *
32
     * @return \ComicVine\Api\Controllers\ControllerQuery
33
     * @throws \ComicVine\Exceptions\EmptyControllerRequestUrl
34
     */
35
    public function getChats()
36
    {
37
        return $this->setFilters()
38
            ->setUrl('/chats');
39
    }
40
41
    /**
42
     * Get all concepts from ComicVine.
43
     *
44
     * @return \ComicVine\Api\Controllers\ControllerQuery
45
     * @throws \ComicVine\Exceptions\EmptyControllerRequestUrl
46
     */
47
    public function getConcepts()
48
    {
49
        return $this->setFilters(true, true, true, true)
50
            ->setUrl('/concepts');
51
    }
52
53
    /**
54
     * Get all episodes from ComicVine.
55
     *
56
     * @return \ComicVine\Api\Controllers\ControllerQuery
57
     * @throws \ComicVine\Exceptions\EmptyControllerRequestUrl
58
     */
59
    public function getEpisodes()
60
    {
61
        return $this->setFilters(true, true, true, true)
62
            ->setUrl('/episodes');
63
    }
64
65
    /**
66
     * Get all issues from ComicVine.
67
     *
68
     * @return \ComicVine\Api\Controllers\ControllerQuery
69
     * @throws \ComicVine\Exceptions\EmptyControllerRequestUrl
70
     */
71
    public function getIssues()
72
    {
73
        return $this->setFilters(true, true, true, true)
74
            ->setUrl('/issus');
75
    }
76
77
    /**
78
     * Get all locations from ComicVine.
79
     *
80
     * @return \ComicVine\Api\Controllers\ControllerQuery
81
     * @throws \ComicVine\Exceptions\EmptyControllerRequestUrl
82
     */
83
    public function getLocations()
84
    {
85
        return $this->setFilters(true, true, true, true)
86
            ->setUrl('/locations');
87
    }
88
89
    /**
90
     * Get all movies from ComicVine.
91
     *
92
     * @return \ComicVine\Api\Controllers\ControllerQuery
93
     * @throws \ComicVine\Exceptions\EmptyControllerRequestUrl
94
     */
95
    public function getMovies()
96
    {
97
        return $this->setFilters(true, true, true, true)
98
            ->setUrl('/movies');
99
    }
100
101
    /**
102
     * Get all objects from ComicVine.
103
     *
104
     * @return \ComicVine\Api\Controllers\ControllerQuery
105
     * @throws \ComicVine\Exceptions\EmptyControllerRequestUrl
106
     */
107
    public function getObjects()
108
    {
109
        return $this->setFilters(true, true, true, true)
110
            ->setUrl('/objects');
111
    }
112
113
    /**
114
     * Get all origins from ComicVine.
115
     *
116
     * @return \ComicVine\Api\Controllers\ControllerQuery
117
     * @throws \ComicVine\Exceptions\EmptyControllerRequestUrl
118
     */
119
    public function getOrigins()
120
    {
121
        return $this->setFilters(true, true, true, true)
122
            ->setUrl('/origins');
123
    }
124
125
    /**
126
     * Get all people from ComicVine.
127
     *
128
     * @return \ComicVine\Api\Controllers\ControllerQuery
129
     * @throws \ComicVine\Exceptions\EmptyControllerRequestUrl
130
     */
131
    public function getPeople()
132
    {
133
        return $this->setFilters(true, true, true, true)
134
            ->setUrl('/people');
135
    }
136
137
    /**
138
     * Get all powers from ComicVine.
139
     *
140
     * @return \ComicVine\Api\Controllers\ControllerQuery
141
     * @throws \ComicVine\Exceptions\EmptyControllerRequestUrl
142
     */
143
    public function getPowers()
144
    {
145
        return $this->setFilters(true, true, true, true)
146
            ->setUrl('/powers');
147
    }
148
149
    /**
150
     * Get all promos from ComicVine.
151
     *
152
     * @return \ComicVine\Api\Controllers\ControllerQuery
153
     * @throws \ComicVine\Exceptions\EmptyControllerRequestUrl
154
     */
155
    public function getPromos()
156
    {
157
        return $this->setFilters(true, true, true, true)
158
            ->setUrl('/promos');
159
    }
160
161
    /**
162
     * Get all publishers from ComicVine.
163
     *
164
     * @return \ComicVine\Api\Controllers\ControllerQuery
165
     * @throws \ComicVine\Exceptions\EmptyControllerRequestUrl
166
     */
167
    public function getPublishers()
168
    {
169
        return $this->setFilters(true, true, true, true)
170
            ->setUrl('/publishers');
171
    }
172
173
    /**
174
     * Get all series from ComicVine.
175
     *
176
     * @return \ComicVine\Api\Controllers\ControllerQuery
177
     * @throws \ComicVine\Exceptions\EmptyControllerRequestUrl
178
     */
179
    public function getSeriesList()
180
    {
181
        return $this->setFilters(true, true, true, true)
182
            ->setUrl('/series_list');
183
    }
184
185
    /**
186
     * Get search result from ComicVine.
187
     *
188
     * @todo Waiting for implementation
189
     */
190
    /*public function getSearch()
191
    {
192
        // @todo Waiting for implementation
193
    }*/
194
195
    /**
196
     * Get all story arcs from ComicVine.
197
     *
198
     * @return \ComicVine\Api\Controllers\ControllerQuery
199
     * @throws \ComicVine\Exceptions\EmptyControllerRequestUrl
200
     */
201
    public function getStoryArcs()
202
    {
203
        return $this->setFilters(true, true, true, true)
204
            ->setUrl('/story_arcs');
205
    }
206
207
    /**
208
     * Get all teams from ComicVine.
209
     *
210
     * @return \ComicVine\Api\Controllers\ControllerQuery
211
     * @throws \ComicVine\Exceptions\EmptyControllerRequestUrl
212
     */
213
    public function getTeams()
214
    {
215
        return $this->setFilters(true, true, true, true)
216
            ->setUrl('/teams');
217
    }
218
219
    /**
220
     * Get all types from ComicVine.
221
     *
222
     * @return \ComicVine\Api\Controllers\ControllerQuery
223
     * @throws \ComicVine\Exceptions\EmptyControllerRequestUrl
224
     */
225
    public function getTypes()
226
    {
227
        return $this->setFilters(false, false, false, false)
228
            ->setUrl('/types');
229
    }
230
231
    /**
232
     * Get videos from ComicVine.
233
     *
234
     * @todo Waiting for implementation
235
     */
236
    /*public function getVideos()
237
    {
238
        // @todo Waiting for implementation
239
    }*/
240
241
    /**
242
     * Get all video types from ComicVine.
243
     *
244
     * @return \ComicVine\Api\Controllers\ControllerQuery
245
     * @throws \ComicVine\Exceptions\EmptyControllerRequestUrl
246
     */
247
    public function getVideoTypes()
248
    {
249
        return $this->setFilters(true, true, false, false)
250
            ->setUrl('/video_types');
251
    }
252
253
    /**
254
     * Get all volumes from ComicVine.
255
     *
256
     * @return \ComicVine\Api\Controllers\ControllerQuery
257
     * @throws \ComicVine\Exceptions\EmptyControllerRequestUrl
258
     */
259
    public function getVolumes()
260
    {
261
        return $this->setFilters(true, true, true, true)
262
            ->setUrl('/volumes');
263
    }
264
265
}