@@ 285-295 (lines=11) @@ | ||
282 | * |
|
283 | * @return array |
|
284 | */ |
|
285 | public function getItemDownloadUrl(string $itemId, bool $includeallversions = false):array |
|
286 | { |
|
287 | $parameters = $this->buildHttpQuery( |
|
288 | [ |
|
289 | 'includeallversions' => $includeallversions, |
|
290 | 'redirect' => false, |
|
291 | ] |
|
292 | ); |
|
293 | ||
294 | return $this->get("Items({$itemId})/Download?{$parameters}"); |
|
295 | } |
|
296 | ||
297 | /** |
|
298 | * Get contents of and item. |
|
@@ 305-315 (lines=11) @@ | ||
302 | * |
|
303 | * @return mixed |
|
304 | */ |
|
305 | public function getItemContents(string $itemId, bool $includeallversions = false) |
|
306 | { |
|
307 | $parameters = $this->buildHttpQuery( |
|
308 | [ |
|
309 | 'includeallversions' => $includeallversions, |
|
310 | 'redirect' => true, |
|
311 | ] |
|
312 | ); |
|
313 | ||
314 | return $this->get("Items({$itemId})/Download?{$parameters}"); |
|
315 | } |
|
316 | ||
317 | /** |
|
318 | * Get the Chunk Uri to start a file-upload. |
|
@@ 455-465 (lines=11) @@ | ||
452 | * |
|
453 | * @return array |
|
454 | */ |
|
455 | public function getThumbnailUrl(string $itemId, int $size = 75):array |
|
456 | { |
|
457 | $parameters = $this->buildHttpQuery( |
|
458 | [ |
|
459 | 'size' => $size, |
|
460 | 'redirect' => false, |
|
461 | ] |
|
462 | ); |
|
463 | ||
464 | return $this->get("Items({$itemId})/Thumbnail?{$parameters}"); |
|
465 | } |
|
466 | ||
467 | /** |
|
468 | * Get browser link for an item. |