This repository was archived by the owner on Jun 9, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +26
-26
lines changed Expand file tree Collapse file tree 2 files changed +26
-26
lines changed Original file line number Diff line number Diff line change @@ -113,6 +113,11 @@ abstract class Plex_Server_Library_ItemAbstract
113
113
*/
114
114
protected $ updatedAt ;
115
115
116
+ /**
117
+ * Endpoint for listing the child items of a parent or grandparent item.
118
+ */
119
+ const ENDPOINT_CHILDREN = 'children ' ;
120
+
116
121
/**
117
122
* Sets an array of attribues, if they exist, to the corresponding class
118
123
* member.
@@ -239,6 +244,26 @@ public function getPolymorphicItem($polymorphicData)
239
244
}
240
245
}
241
246
247
+ /**
248
+ * Builds an endpoint for an item to retrieve its children and grandchildren
249
+ * items.
250
+ *
251
+ * @uses Plex_Server_Library::ENDPOINT_METADATA
252
+ * @uses Plex_Server_Library_SectionAbstract::ENDPOINT_CHILDREN
253
+ * @uses Plex_Server_Library_ItemAbstract::getRatingKey()
254
+ *
255
+ * @return string The requested children endpoint.
256
+ */
257
+ protected function buildChildrenEndpoint ()
258
+ {
259
+ return sprintf (
260
+ '%s/%d/%s ' ,
261
+ Plex_Server_Library::ENDPOINT_METADATA ,
262
+ $ this ->getRatingKey (),
263
+ self ::ENDPOINT_CHILDREN
264
+ );
265
+ }
266
+
242
267
/**
243
268
* Static factory method used to instantiate child item classes by their
244
269
* type.
Original file line number Diff line number Diff line change @@ -156,15 +156,10 @@ abstract class Plex_Server_Library_SectionAbstract extends Plex_Server_Library
156
156
const ENDPOINT_CATEGORY_YEAR = 'year ' ;
157
157
158
158
/**
159
- * Endpoing for searching a section for items.
159
+ * Endpoint for searching a section for items.
160
160
*/
161
161
const ENDPOINT_SEARCH = 'search ' ;
162
162
163
- /**
164
- * Endping for listing the child items of a parent or grandparent item.
165
- */
166
- const ENDPOINT_CHILDREN = 'children ' ;
167
-
168
163
/**
169
164
* Parameter for searching movies.
170
165
*/
@@ -295,26 +290,6 @@ protected function buildSearchEndpoint($type, $query)
295
290
return $ this ->buildEndpoint ($ endpoint );
296
291
}
297
292
298
- /**
299
- * Builds an endpoint for an item to retrieve its children and grandchildren
300
- * items.
301
- *
302
- * @uses Plex_Server_Library::ENDPOINT_METADATA
303
- * @uses Plex_Server_Library_SectionAbstract::ENDPOINT_CHILDREN
304
- * @uses Plex_Server_Library_ItemAbstract::getRatingKey()
305
- *
306
- * @return string The requested children endpoint.
307
- */
308
- protected function buildChildrenEndpoint ()
309
- {
310
- return sprintf (
311
- '%s/%d/%s ' ,
312
- Plex_Server_Library::ENDPOINT_METADATA ,
313
- $ this ->getRatingKey (),
314
- self ::ENDPOINT_CHILDREN
315
- );
316
- }
317
-
318
293
/**
319
294
* Generic method allowing a child class to retrieve all items for its
320
295
* section.
You can’t perform that action at this time.
0 commit comments