1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/* |
4
|
|
|
* This file is part of the zibios/wrike-php-library package. |
5
|
|
|
* |
6
|
|
|
* (c) Zbigniew Ślązak |
7
|
|
|
* |
8
|
|
|
* For the full copyright and license information, please view the LICENSE |
9
|
|
|
* file that was distributed with this source code. |
10
|
|
|
*/ |
11
|
|
|
|
12
|
|
|
namespace Zibios\WrikePhpLibrary\Resource; |
13
|
|
|
|
14
|
|
|
use Zibios\WrikePhpLibrary\Enum\Api\RequestPathFormatEnum; |
15
|
|
|
use Zibios\WrikePhpLibrary\Enum\Api\ResourceMethodEnum; |
16
|
|
|
use Zibios\WrikePhpLibrary\Resource\Traits\CreateForFolderTrait; |
17
|
|
|
use Zibios\WrikePhpLibrary\Resource\Traits\CreateForTaskTrait; |
18
|
|
|
use Zibios\WrikePhpLibrary\Resource\Traits\DeleteTrait; |
19
|
|
|
use Zibios\WrikePhpLibrary\Resource\Traits\DownloadPreviewTrait; |
20
|
|
|
use Zibios\WrikePhpLibrary\Resource\Traits\DownloadTrait; |
21
|
|
|
use Zibios\WrikePhpLibrary\Resource\Traits\GetAllForAccountTrait; |
22
|
|
|
use Zibios\WrikePhpLibrary\Resource\Traits\GetAllForFolderTrait; |
23
|
|
|
use Zibios\WrikePhpLibrary\Resource\Traits\GetAllForTaskTrait; |
24
|
|
|
use Zibios\WrikePhpLibrary\Resource\Traits\GetByIdTrait; |
25
|
|
|
use Zibios\WrikePhpLibrary\Resource\Traits\GetPublicUrlTrait; |
26
|
|
|
use Zibios\WrikePhpLibrary\Resource\Traits\UpdateTrait; |
27
|
|
|
|
28
|
|
|
/** |
29
|
|
|
* Attachment Resource. |
30
|
|
|
*/ |
31
|
|
|
class AttachmentResource extends AbstractResource |
32
|
|
|
{ |
33
|
|
|
use GetAllForAccountTrait; |
34
|
|
|
use GetAllForFolderTrait; |
35
|
|
|
use GetAllForTaskTrait; |
36
|
|
|
use GetByIdTrait; |
37
|
|
|
use DownloadTrait; |
38
|
|
|
use DownloadPreviewTrait; |
39
|
|
|
use GetPublicUrlTrait; |
40
|
|
|
use CreateForFolderTrait; |
41
|
|
|
use CreateForTaskTrait; |
42
|
|
|
use UpdateTrait; |
43
|
|
|
use DeleteTrait; |
44
|
|
|
|
45
|
|
|
/** |
46
|
|
|
* @return array |
47
|
|
|
*/ |
48
|
22 |
|
protected function getResourceMethodConfiguration() |
49
|
|
|
{ |
50
|
|
|
return [ |
51
|
22 |
|
ResourceMethodEnum::GET_ALL_FOR_ACCOUNT => RequestPathFormatEnum::ATTACHMENTS_FOR_ACCOUNT, |
52
|
|
|
ResourceMethodEnum::GET_ALL_FOR_FOLDER => RequestPathFormatEnum::ATTACHMENTS_FOR_FOLDER, |
53
|
|
|
ResourceMethodEnum::GET_ALL_FOR_TASK => RequestPathFormatEnum::ATTACHMENTS_FOR_TASK, |
54
|
|
|
ResourceMethodEnum::GET_BY_ID => RequestPathFormatEnum::ATTACHMENTS_BY_ID, |
55
|
|
|
ResourceMethodEnum::DOWNLOAD => RequestPathFormatEnum::ATTACHMENTS_DOWNLOAD, |
56
|
|
|
ResourceMethodEnum::DOWNLOAD_PREVIEW => RequestPathFormatEnum::ATTACHMENTS_DOWNLOAD_PREVIEW, |
57
|
|
|
ResourceMethodEnum::GET_PUBLIC_URL => RequestPathFormatEnum::ATTACHMENTS_URL, |
58
|
|
|
ResourceMethodEnum::CREATE_FOR_FOLDER => RequestPathFormatEnum::ATTACHMENTS_FOR_FOLDER, |
59
|
|
|
ResourceMethodEnum::CREATE_FOR_TASK => RequestPathFormatEnum::ATTACHMENTS_FOR_TASK, |
60
|
|
|
ResourceMethodEnum::UPDATE => RequestPathFormatEnum::ATTACHMENTS_BY_ID, |
61
|
|
|
ResourceMethodEnum::DELETE => RequestPathFormatEnum::ATTACHMENTS_BY_ID, |
62
|
|
|
]; |
63
|
|
|
} |
64
|
|
|
} |
65
|
|
|
|