@@ 281-291 (lines=11) @@ | ||
278 | * |
|
279 | * @return array |
|
280 | */ |
|
281 | public function getItemDownloadUrl(string $itemId, bool $includeallversions = false):array |
|
282 | { |
|
283 | $parameters = $this->buildHttpQuery( |
|
284 | [ |
|
285 | 'includeallversions' => $includeallversions, |
|
286 | 'redirect' => false, |
|
287 | ] |
|
288 | ); |
|
289 | ||
290 | return $this->get("Items({$itemId})/Download?{$parameters}"); |
|
291 | } |
|
292 | ||
293 | /** |
|
294 | * Get contents of and item. |
|
@@ 301-311 (lines=11) @@ | ||
298 | * |
|
299 | * @return mixed |
|
300 | */ |
|
301 | public function getItemContents(string $itemId, bool $includeallversions = false) |
|
302 | { |
|
303 | $parameters = $this->buildHttpQuery( |
|
304 | [ |
|
305 | 'includeallversions' => $includeallversions, |
|
306 | 'redirect' => true, |
|
307 | ] |
|
308 | ); |
|
309 | ||
310 | return $this->get("Items({$itemId})/Download?{$parameters}"); |
|
311 | } |
|
312 | ||
313 | /** |
|
314 | * Get the Chunk Uri to start a file-upload. |
|
@@ 389-399 (lines=11) @@ | ||
386 | * |
|
387 | * @return array |
|
388 | */ |
|
389 | public function getThumbnailUrl(string $itemId, int $size = 75):array |
|
390 | { |
|
391 | $parameters = $this->buildHttpQuery( |
|
392 | [ |
|
393 | 'size' => $size, |
|
394 | 'redirect' => false, |
|
395 | ] |
|
396 | ); |
|
397 | ||
398 | return $this->get("Items({$itemId})/Thumbnail?{$parameters}"); |
|
399 | } |
|
400 | ||
401 | /** |
|
402 | * Get browser link for an item. |