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