@@ -189,4 +189,106 @@ public function postRenderWithHttpInfo($edit)
189189 }
190190 }
191191
192+ /**
193+ * getRender
194+ *
195+ *
196+ *
197+ * @param string $id The id of the timeline render task in UUID format (required)
198+ * @return \Shotstack\Model\RenderResponse
199+ * @throws \Shotstack\ApiException on non-2xx response
200+ */
201+ public function getRender ($ id )
202+ {
203+ list ($ response , $ statusCode , $ httpHeader ) = $ this ->getRenderWithHttpInfo ($ id );
204+ return $ response ;
205+ }
206+
207+
208+ /**
209+ * getRenderWithHttpInfo
210+ *
211+ *
212+ *
213+ * @param string $id The id of the timeline render task in UUID format (required)
214+ * @return Array of \Shotstack\Model\RenderResponse, HTTP status code, HTTP response headers (array of strings)
215+ * @throws \Shotstack\ApiException on non-2xx response
216+ */
217+ public function getRenderWithHttpInfo ($ id )
218+ {
219+
220+ // verify the required parameter 'id' is set
221+ if ($ id === null ) {
222+ throw new \InvalidArgumentException ('Missing the required parameter $id when calling getRender ' );
223+ }
224+
225+ // parse inputs
226+ $ resourcePath = "/render/{id} " ;
227+ $ httpBody = '' ;
228+ $ queryParams = array ();
229+ $ headerParams = array ();
230+ $ formParams = array ();
231+ $ _header_accept = ApiClient::selectHeaderAccept (array ('application/json ' ));
232+ if (!is_null ($ _header_accept )) {
233+ $ headerParams ['Accept ' ] = $ _header_accept ;
234+ }
235+ $ headerParams ['Content-Type ' ] = ApiClient::selectHeaderContentType (array ());
236+
237+
238+
239+ // path params
240+
241+ if ($ id !== null ) {
242+ $ resourcePath = str_replace (
243+ "{ " . "id " . "} " ,
244+ $ this ->apiClient ->getSerializer ()->toPathValue ($ id ),
245+ $ resourcePath
246+ );
247+ }
248+ // default format to json
249+ $ resourcePath = str_replace ("{format} " , "json " , $ resourcePath );
250+
251+
252+
253+
254+ // for model (json/xml)
255+ if (isset ($ _tempBody )) {
256+ $ httpBody = $ _tempBody ; // $_tempBody is the method argument, if present
257+ } elseif (count ($ formParams ) > 0 ) {
258+ $ httpBody = $ formParams ; // for HTTP post (form)
259+ }
260+
261+ // this endpoint requires API key authentication
262+ $ apiKey = $ this ->apiClient ->getApiKeyWithPrefix ('x-api-key ' );
263+ if (strlen ($ apiKey ) !== 0 ) {
264+ $ headerParams ['x-api-key ' ] = $ apiKey ;
265+ }
266+
267+
268+ // make the API Call
269+ try {
270+ list ($ response , $ statusCode , $ httpHeader ) = $ this ->apiClient ->callApi (
271+ $ resourcePath , 'GET ' ,
272+ $ queryParams , $ httpBody ,
273+ $ headerParams , '\Shotstack\Model\RenderResponse '
274+ );
275+
276+ if (!$ response ) {
277+ return array (null , $ statusCode , $ httpHeader );
278+ }
279+
280+ return array (\Shotstack \ObjectSerializer::deserialize ($ response , '\Shotstack\Model\RenderResponse ' , $ httpHeader ), $ statusCode , $ httpHeader );
281+
282+ } catch (ApiException $ e ) {
283+ switch ($ e ->getCode ()) {
284+ case 200 :
285+ $ data = \Shotstack \ObjectSerializer::deserialize ($ e ->getResponseBody (), '\Shotstack\Model\RenderResponse ' , $ e ->getResponseHeaders ());
286+ $ e ->setResponseObject ($ data );
287+ break ;
288+ }
289+
290+ throw $ e ;
291+ }
292+ }
293+
192294}
0 commit comments