You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/OpencastApi/Rest/OcSeries.php
+9-97Lines changed: 9 additions & 97 deletions
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ public function getCount()
25
25
/**
26
26
* Returns the access control list for the series with the given identifier as JSON (Object) by default or XLM (text).
27
27
*
28
-
* @param string $seriesId The series identifier
28
+
* @param string $seriesId The series identifier
29
29
* @param string $format (optional) The output format (json or xml) of the response body. (Default value = 'json')
30
30
*
31
31
* @return array the response result ['code' => 200, 'body' => '{The access control list as JSON (Object) or XML (text)}']
@@ -40,17 +40,6 @@ public function getAcl($seriesId, $format = '')
40
40
return$this->restClient->performGet($uri);
41
41
}
42
42
43
-
/**
44
-
* Returns a list of identifier and title of all series
45
-
* @return array the response result ['code' => 200, 'body' => '{JSON (object) list of identifier and title of all series}']
46
-
* @deprecated since version v1.3, removed from Opencast Version 12
47
-
*/
48
-
publicfunctiongetTitles()
49
-
{
50
-
$uri = self::URI . "/allSeriesIdTitle.json";
51
-
return$this->restClient->performGet($uri);
52
-
}
53
-
54
43
/**
55
44
* Returns the series with the given identifier as JSON (Object) by default or XLM (text).
56
45
*
@@ -68,7 +57,7 @@ public function get($seriesId, $format = '')
68
57
69
58
return$this->restClient->performGet($uri);
70
59
}
71
-
60
+
72
61
/**
73
62
* Returns the series element
74
63
*
@@ -113,7 +102,7 @@ public function getProperties($seriesId)
113
102
* Returns a series property value
114
103
*
115
104
* @param string $seriesId The series identifier
116
-
* @param string $propertyName Name of series property
105
+
* @param string $propertyName Name of series property
117
106
*
118
107
* @return array the response result ['code' => 200, 'body' => '{JSON (object) series property value}']
119
108
*/
@@ -123,83 +112,6 @@ public function getProperty($seriesId, $propertyName)
123
112
return$this->restClient->performGet($uri);
124
113
}
125
114
126
-
/**
127
-
* Returns the series matching the query parameters as JSON (array) by default or XLM (text).
128
-
*
129
-
* @param array $params (optional) The list of query params to pass which can contain the followings:
130
-
* [
131
-
* 'q' => '{Free text search}',
132
-
* 'edit' => '(boolean){Whether this query should return only series that are editable}',
133
-
* 'fuzzyMatch' => '(boolean){Whether the seriesId can be used for a partial match. The default is an exact match}',
134
-
* 'seriesId' => '{The series identifier}',
135
-
* 'seriesTitle' => '{The series title}',
136
-
* 'creator' => '{The series creator}',
137
-
* 'contributor' => '{The series contributor}',
138
-
* 'publisher' => '{The series publisher}',
139
-
* 'rightsholder' => '{The series rights holder}',
140
-
* 'createdfrom' => '{Filter results by created from (yyyy-MM-dd'T'HH:mm:ss'Z') }',
141
-
* 'createdto' => '{Filter results by created to (yyyy-MM-dd'T'HH:mm:ss'Z')) }',
142
-
* 'language' => '{The series language}',
143
-
* 'license' => '{The series license}',
144
-
* 'subject' => '{The series subject}',
145
-
* 'abstract' => '{The series abstract}',
146
-
* 'description' => '{The series description}',
147
-
* 'sort' => '{The sort order. May include any of the following: TITLE, SUBJECT, CREATOR, PUBLISHER, CONTRIBUTOR, ABSTRACT, DESCRIPTION, CREATED, AVAILABLE_FROM, AVAILABLE_TO, LANGUAGE, RIGHTS_HOLDER, SPATIAL, TEMPORAL, IS_PART_OF, REPLACES, TYPE, ACCESS, LICENCE. Add '_DESC' to reverse the sort order (e.g. TITLE_DESC)}',
148
-
* 'startPage' => '{The page offset}',
149
-
* 'count' => '{Results per page (max 100)}',
150
-
* ]
151
-
* @param string $format (optional) The output format (json or xml) of the response body. (Default value = 'json')
152
-
*
153
-
* @return array the response result ['code' => 200, 'body' => '{the series search results as JSON (array) or XML (text)}']
154
-
* @deprecated Deprecated since version 1.3 - since it is removed from Opencast Verrsion 12.
155
-
*/
156
-
publicfunctiongetAll($params = [], $format = '')
157
-
{
158
-
$uri = self::URI . "/series.json";
159
-
if (!empty($format) && strtolower($format) == 'xml') {
@@ -112,26 +112,9 @@ public function getStateMappings()
112
112
return$this->restClient->performGet($uri);
113
113
}
114
114
115
-
/**
116
-
* Returns the workflow statistics as JSON (Object) by default or XLM (text)
117
-
*
118
-
* @param string $format (optional) The output format (json or xml) of the response body. (Default value = 'json')
119
-
*
120
-
* @return array the response result ['code' => 200, 'body' => '{A JSON (object) | XML (text) representation of the workflow statistics }']
121
-
* @deprecated from version v1.3 and will be removed in v1.4
122
-
*/
123
-
publicfunctiongetStatistics($format = '')
124
-
{
125
-
$uri = self::URI . "/statistics.json";
126
-
if (!empty($format) && strtolower($format) == 'xml') {
127
-
$uri = str_replace('.json', '.xml', $uri);
128
-
}
129
-
return$this->restClient->performGet($uri);
130
-
}
131
-
132
115
/**
133
116
* Get a specific workflow instance as JSON (Object) by default or XLM (text).
134
-
*
117
+
*
135
118
* @param string $instanceId The workflow instance identifier
136
119
* @param string $format (optional) The output format (json or xml) of the response body. (Default value = 'json')
137
120
*
@@ -146,82 +129,11 @@ public function getInstance($instanceId, $format = '')
146
129
return$this->restClient->performGet($uri);
147
130
}
148
131
149
-
/**
150
-
* List all workflow instances matching the query parameters as JSON (Object) by default or XLM (text).
151
-
*
152
-
* @param array $params (optional) The list of query params to pass which can contain the followings:
153
-
* [
154
-
* 'state' => '{Filter results by workflows' current state}',
155
-
* 'q' => '{Filter results by free text query}',
156
-
* 'seriesId' => '{ Filter results by series identifier }',
157
-
* 'seriesTitle' => '{ Filter results by series title }',
158
-
* 'creator' => '{ Filter results by the mediapackage's creator }',
159
-
* 'contributor' => '{Filter results by the mediapackage's contributor}',
160
-
* 'fromdate' => '{Filter results by workflow start date}',
161
-
* 'todate' => '{Filter results by workflow start date}',
162
-
* 'language' => '{Filter results by mediapackage's language.}',
163
-
* 'license' => '{Filter results by mediapackage's license}',
164
-
* 'title' => '{Filter results by mediapackage's title}',
165
-
* 'subject' => '{Filter results by mediapackage's subject}',
166
-
* 'workflowdefinition' => '{Filter results by workflow definition}',
167
-
* 'mp' => '{Filter results by mediapackage identifier.}',
168
-
* 'op' => '{ Filter results by workflows' current operation}',
169
-
* 'sort' => '{The sort order. May include any of the following: DATE_CREATED, TITLE, SERIES_TITLE, SERIES_ID, MEDIA_PACKAGE_ID, WORKFLOW_DEFINITION_ID, CREATOR, CONTRIBUTOR, LANGUAGE, LICENSE, SUBJECT. Add '_DESC' to reverse the sort order (e.g. TITLE_DESC)}',
170
-
* 'startPage' => '{(Default value=0): The paging offset }',
171
-
* 'count' => '{(Default value=0): The number of results to return.}',
172
-
* 'compact' => '{Whether to return a compact version of the workflow instance, with mediapackage elements, workflow and workflow operation configurations and non-current operations removed}',
173
-
* ]
174
-
* @param string $format (optional) The output format (json or xml) of the response body. (Default value = 'json')
175
-
*
176
-
* @return array the response result ['code' => 200, 'body' => '{A JSON (object) | XML (text) representation of the workflow set }']
177
-
* @deprecated from version v1.3 and will be removed in v1.4
* (Danger!) Permenantly removes a workflow instance including all its child jobs.
222
134
* In most circumstances, /stop is what you should use.
223
135
*
224
-
* @param string $instanceId The workflow instance identifier
136
+
* @param string $instanceId The workflow instance identifier
225
137
* @param boolean $force (optional) If the workflow status should be ignored and the workflow removed anyway (Default value=false)
226
138
*
227
139
* @return array the response result ['code' => 204, 'reason' => 'No Content'] (If workflow instance could be removed successfully, no content is returned)
@@ -246,7 +158,7 @@ public function removeInstance($instanceId, $force = false)
246
158
* @param array|string $mediapackage (Optional) The new Mediapackage
0 commit comments