MessagesRequest::setDelete()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 1
dl 0
loc 6
rs 10
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * This class is generated using the package carono/codegen
5
 */
6
7
namespace carono\etxtru\request;
8
9
class MessagesRequest extends \carono\etxtru\RequestAbstract
10
{
11
	/**
12
	 * Функция выводит непрочитанные системные сообщения пользователя. Максимальный лимит сообщений 100.
13
	 *
14
	 * @param int $from Дата, с которой выводить сообщения, unixtime
15
	 * @return \carono\etxtru\response\GetListResponse|\stdClass
16
	 */
17
	public function getList($from)
18
	{
19
		$params = [
20
			'from' => $from
21
		];
22
		return $this->getClient()->getContent('messages.getList', $params, 'carono\etxtru\response\GetListResponse');
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->getClient(...ponse\GetListResponse') also could return the type carono\etxtru\Response which is incompatible with the documented return type carono\etxtru\response\GetListResponse|stdClass.
Loading history...
23
	}
24
25
26
	/**
27
	 * Функция помечает указанные непрочитанные системные сообщения пользователя как прочитанные.
28
	 *
29
	 * @param array (int var1, int var2, ...) $ids Массив идентификаторов сообщений
0 ignored issues
show
Documentation Bug introduced by
The doc comment (int at position 1 could not be parsed: Expected ')' at position 1, but found 'int'.
Loading history...
30
	 * @return \carono\etxtru\response\SetReadResponse|\stdClass
31
	 */
32
	public function setRead($ids)
33
	{
34
		$params = [
35
			'ids' => $ids
36
		];
37
		return $this->getClient()->getContent('messages.setRead', $params, 'carono\etxtru\response\SetReadResponse');
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->getClient(...ponse\SetReadResponse') also could return the type carono\etxtru\Response which is incompatible with the documented return type carono\etxtru\response\SetReadResponse|stdClass.
Loading history...
38
	}
39
40
41
	/**
42
	 * Функция удаляет указанные непрочитанные системные сообщения пользователя.
43
	 *
44
	 * @param array (int var1, int var2, ...) $ids Массив идентификаторов сообщений
0 ignored issues
show
Documentation Bug introduced by
The doc comment (int at position 1 could not be parsed: Expected ')' at position 1, but found 'int'.
Loading history...
45
	 * @return \carono\etxtru\response\SetDeleteResponse|\stdClass
46
	 */
47
	public function setDelete($ids)
48
	{
49
		$params = [
50
			'ids' => $ids
51
		];
52
		return $this->getClient()->getContent('messages.setDelete', $params, 'carono\etxtru\response\SetDeleteResponse');
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->getClient(...nse\SetDeleteResponse') also could return the type carono\etxtru\Response which is incompatible with the documented return type carono\etxtru\response\SetDeleteResponse|stdClass.
Loading history...
53
	}
54
55
56
	/**
57
	 * Функция выводит сообщения из привата с указанным пользователем.
58
	 *
59
	 * @param \carono\etxtru\config\MessagesReadPrivateConfig|array $config
60
	 * @return \carono\etxtru\response\ReadPrivateResponse|\stdClass
61
	 */
62
	public function readPrivate($config)
63
	{
64
		$params = [];
65
		foreach ($config instanceof \carono\etxtru\ConfigAbstract ? $config->toArray() : $config as $key => $value) {
66
		    $params[$key] = $value;
67
		}
68
		return $this->getClient()->getContent('messages.readPrivate', $params, 'carono\etxtru\response\ReadPrivateResponse');
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->getClient(...e\ReadPrivateResponse') also could return the type carono\etxtru\Response which is incompatible with the documented return type carono\etxtru\response\R...rivateResponse|stdClass.
Loading history...
69
	}
70
71
72
	/**
73
	 * Функция возвращает количество непрочитанных сообщений из привата, с группировкой по авторам.
74
	 *
75
	 * @return \carono\etxtru\response\GetCountUnreadResponse|\stdClass
76
	 */
77
	public function getCountUnread()
78
	{
79
		$params = [];
80
		return $this->getClient()->getContent('messages.getCountUnread', $params, 'carono\etxtru\response\GetCountUnreadResponse');
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->getClient(...etCountUnreadResponse') also could return the type carono\etxtru\Response which is incompatible with the documented return type carono\etxtru\response\G...UnreadResponse|stdClass.
Loading history...
81
	}
82
83
84
	/**
85
	 * Функция посылает сообщение в приват указанному пользователем. Данная возможность доступна
86
	 * пользователям с рейтингом более 10000. Таймаут между сообщениями 1 минута.
87
	 *
88
	 * @param int $id_user Идентификатор пользователя, обязательный параметр
89
	 * @param string $text Текст сообщения, максимально 10000 символов
90
	 * @return \carono\etxtru\response\WritePrivateResponse|\stdClass
91
	 */
92
	public function writePrivate($id_user, $text)
93
	{
94
		$params = [
95
			'id_user' => $id_user,
96
			'text' => $text
97
		];
98
		return $this->getClient()->getContent('messages.writePrivate', $params, 'carono\etxtru\response\WritePrivateResponse');
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->getClient(...\WritePrivateResponse') also could return the type carono\etxtru\Response which is incompatible with the documented return type carono\etxtru\response\W...rivateResponse|stdClass.
Loading history...
99
	}
100
}
101