carono /
etxtru-api
| 1 | <?php |
||
| 2 | |||
| 3 | /** |
||
| 4 | * This class is generated using the package carono/codegen |
||
| 5 | */ |
||
| 6 | |||
| 7 | namespace carono\etxtru\request; |
||
| 8 | |||
| 9 | class ArticlesArchiveRequest extends \carono\etxtru\RequestAbstract |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * Возвращает список купленных пользователм статей и перенесенных в архив статей. |
||
| 13 | * |
||
| 14 | * @param \carono\etxtru\config\ArticlesArchiveGetListConfig|array $config |
||
| 15 | * @return \carono\etxtru\response\GetListResponse|\stdClass |
||
| 16 | */ |
||
| 17 | public function getList($config) |
||
| 18 | { |
||
| 19 | $params = []; |
||
| 20 | foreach ($config instanceof \carono\etxtru\ConfigAbstract ? $config->toArray() : $config as $key => $value) { |
||
| 21 | $params[$key] = $value; |
||
| 22 | } |
||
| 23 | return $this->getClient()->getContent('articles_archive.getList', $params, 'carono\etxtru\response\GetListResponse'); |
||
|
0 ignored issues
–
show
Bug
Best Practice
introduced
by
Loading history...
|
|||
| 24 | } |
||
| 25 | |||
| 26 | |||
| 27 | /** |
||
| 28 | * Функция выводит тексты запрошенных статей из архива текущего пользователя |
||
| 29 | * |
||
| 30 | * @param array (int var1, int var2, ...) $id Массив идентификаторов статей в архиве |
||
|
0 ignored issues
–
show
|
|||
| 31 | * @return \carono\etxtru\response\GetTextResponse|\stdClass |
||
| 32 | */ |
||
| 33 | public function getText($id) |
||
| 34 | { |
||
| 35 | $params = [ |
||
| 36 | 'id' => $id |
||
| 37 | ]; |
||
| 38 | return $this->getClient()->getContent('articles_archive.getText', $params, 'carono\etxtru\response\GetTextResponse'); |
||
|
0 ignored issues
–
show
|
|||
| 39 | } |
||
| 40 | |||
| 41 | |||
| 42 | /** |
||
| 43 | * Функция создает zip архив с текстами и изображениями указанных статей из архива для текущего |
||
| 44 | * пользователя |
||
| 45 | * |
||
| 46 | * @param array (int var1, int var2, ...) $id Массив идентификаторов статей из архива |
||
|
0 ignored issues
–
show
|
|||
| 47 | * @return \carono\etxtru\response\DownloadResponse|\stdClass |
||
| 48 | */ |
||
| 49 | public function download($id) |
||
| 50 | { |
||
| 51 | $params = [ |
||
| 52 | 'id' => $id |
||
| 53 | ]; |
||
| 54 | return $this->getClient()->getContent('articles_archive.download', $params, 'carono\etxtru\response\DownloadResponse'); |
||
|
0 ignored issues
–
show
|
|||
| 55 | } |
||
| 56 | } |
||
| 57 |