Passed
Push — main ( c2314c...1a7704 )
by Abbotton
10:22
created

Material::searchFolder()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 1
b 0
f 0
1
<?php
2
3
namespace Abbotton\DouDian\Api;
4
5
use Illuminate\Http\Client\RequestException;
6
use Psr\SimpleCache\InvalidArgumentException;
7
8
class Material extends BaseRequest
9
{
10
    /**
11
     * 查询商品详情.
12
     *
13
     * @param  array  $params
14
     * @return array
15
     * @throws InvalidArgumentException
16
     * @throws RequestException
17
     */
18
    public function materialsProductsDetails(array $params): array
19
    {
20
        return $this->httpPost('alliance/materialsProductsDetails', $params);
21
    }
22
23
    /**
24
     * 创建文件夹.
25
     *
26
     * @param  array  $params
27
     * @return array
28
     * @throws InvalidArgumentException
29
     * @throws RequestException
30
     */
31
    public function createFolder(array $params): array
32
    {
33
        return $this->httpPost('material/createFolder', $params);
34
    }
35
36
    /**
37
     * 将文件夹移动到回收站.
38
     *
39
     * @param  array  $params
40
     * @return array
41
     * @throws InvalidArgumentException
42
     * @throws RequestException
43
     */
44
    public function moveFolderToRecycleBin(array $params): array
45
    {
46
        return $this->httpPost('material/moveFolderToRecycleBin', $params);
47
    }
48
49
    /**
50
     * 编辑/移动文件夹.
51
     *
52
     * @param  array  $params
53
     * @return array
54
     * @throws InvalidArgumentException
55
     * @throws RequestException
56
     */
57
    public function editFolder(array $params): array
58
    {
59
        return $this->httpPost('material/editFolder', $params);
60
    }
61
62
    /**
63
     * 移动素材到回收站.
64
     *
65
     * @param  array  $params
66
     * @return array
67
     * @throws InvalidArgumentException
68
     * @throws RequestException
69
     */
70
    public function moveMaterialToRecycleBin(array $params): array
71
    {
72
        return $this->httpPost('material/moveMaterialToRecycleBin', $params);
73
    }
74
75
    /**
76
     * 从回收站中恢复素材.
77
     *
78
     * @param  array  $params
79
     * @return array
80
     * @throws InvalidArgumentException
81
     * @throws RequestException
82
     */
83
    public function recoverMaterial(array $params): array
84
    {
85
        return $this->httpPost('material/recoverMaterial', $params);
86
    }
87
88
    /**
89
     * 编辑素材.
90
     *
91
     * @param  array  $params
92
     * @return array
93
     * @throws InvalidArgumentException
94
     * @throws RequestException
95
     */
96
    public function editMaterial(array $params): array
97
    {
98
        return $this->httpPost('material/editMaterial', $params);
99
    }
100
101
    /**
102
     * 从回收站恢复文件夹.
103
     *
104
     * @param  array  $params
105
     * @return array
106
     * @throws InvalidArgumentException
107
     * @throws RequestException
108
     */
109
    public function recoverFolder(array $params): array
110
    {
111
        return $this->httpPost('material/recoverFolder', $params);
112
    }
113
114
    /**
115
     * 彻底删除素材.
116
     *
117
     * @param  array  $params
118
     * @return array
119
     * @throws InvalidArgumentException
120
     * @throws RequestException
121
     */
122
    public function deleteMaterial(array $params): array
123
    {
124
        return $this->httpPost('material/deleteMaterial', $params);
125
    }
126
127
    /**
128
     * 彻底删除文件夹.
129
     *
130
     * @param  array  $params
131
     * @return array
132
     * @throws InvalidArgumentException
133
     * @throws RequestException
134
     */
135
    public function deleteFolder(array $params): array
136
    {
137
        return $this->httpPost('material/deleteFolder', $params);
138
    }
139
140
    /**
141
     * 查素材详情.
142
     *
143
     * @param  array  $params
144
     * @return array
145
     * @throws InvalidArgumentException
146
     * @throws RequestException
147
     */
148
    public function queryMaterialDetail(array $params): array
149
    {
150
        return $this->httpPost('material/queryMaterialDetail', $params);
151
    }
152
153
    /**
154
     * 同步上传素材.
155
     *
156
     * @param  array  $params
157
     * @return array
158
     * @throws InvalidArgumentException
159
     * @throws RequestException
160
     */
161
    public function uploadImageSync(array $params): array
162
    {
163
        return $this->httpPost('material/uploadImageSync', $params);
164
    }
165
166
    /**
167
     * 素材中心--异步上传视频接口.
168
     *
169
     * @param  array  $params
170
     * @return array
171
     * @throws InvalidArgumentException
172
     * @throws RequestException
173
     */
174
    public function uploadVideoAsync(array $params): array
175
    {
176
        return $this->httpPost('material/uploadVideoAsync', $params);
177
    }
178
179
    /**
180
     * 搜索素材.
181
     *
182
     * @param  array  $params
183
     * @return array
184
     * @throws InvalidArgumentException
185
     * @throws RequestException
186
     */
187
    public function searchMaterial(array $params): array
188
    {
189
        return $this->httpPost('material/searchMaterial', $params);
190
    }
191
192
    /**
193
     * 搜索文件夹.
194
     *
195
     * @param  array  $params
196
     * @return array
197
     * @throws InvalidArgumentException
198
     * @throws RequestException
199
     */
200
    public function searchFolder(array $params): array
201
    {
202
        return $this->httpPost('material/searchFolder', $params);
203
    }
204
205
    /**
206
     * 查看文件夹详情.
207
     *
208
     * @param  array  $params
209
     * @return array
210
     * @throws InvalidArgumentException
211
     * @throws RequestException
212
     */
213
    public function getFolderInfo(array $params): array
214
    {
215
        return $this->httpPost('material/getFolderInfo', $params);
216
    }
217
}
218