1 | <?php |
||
5 | class JSONRequest extends Request |
||
6 | { |
||
7 | /** |
||
8 | * @return array |
||
9 | */ |
||
10 | public static function getAllowedMethods() |
||
24 | |||
25 | /** |
||
26 | * @param string|array $to |
||
27 | * @param string $from |
||
28 | * @param string $message |
||
29 | * @param array $params |
||
30 | * @return array|null |
||
31 | */ |
||
32 | public function send($to, $from, $message, $params = [ ]) |
||
47 | |||
48 | /** |
||
49 | * @param string $name |
||
50 | * @return array|null |
||
51 | */ |
||
52 | public function requestSource($name) |
||
56 | |||
57 | /** |
||
58 | * @param null|string $groupId |
||
59 | * @param null|string $phone |
||
60 | * @return array|null |
||
61 | */ |
||
62 | public function getContacts($groupId = null, $phone = null) |
||
69 | |||
70 | /** |
||
71 | * @param string $phone |
||
72 | * @return array|null |
||
73 | */ |
||
74 | public function getPhoneInfo($phone) |
||
78 | |||
79 | /** |
||
80 | * @param array $contactInfo |
||
81 | * @return array|null |
||
82 | */ |
||
83 | public function addContact(array $contactInfo) |
||
87 | |||
88 | /** |
||
89 | * @param string|null $groupId |
||
90 | * @param string|null $groupName |
||
91 | * @return array|null |
||
92 | */ |
||
93 | public function getGroups($groupId = null, $groupName = null) |
||
100 | |||
101 | /** |
||
102 | * @param string $name |
||
103 | * @return array|null |
||
104 | */ |
||
105 | public function createGroup($name) |
||
109 | |||
110 | /** |
||
111 | * @param string $id |
||
112 | * @param string $name |
||
113 | * @return array|null |
||
114 | */ |
||
115 | public function editGroup($name, $id) |
||
119 | |||
120 | /** |
||
121 | * @return array|null |
||
122 | */ |
||
123 | public function getAccountInfo() |
||
127 | |||
128 | /** |
||
129 | * @param string $phone |
||
130 | * @param string|null $groupId |
||
131 | * @return array|null |
||
132 | */ |
||
133 | public function removeContact($phone, $groupId = null) |
||
137 | |||
138 | /** |
||
139 | * @param string $action |
||
140 | * @return string |
||
141 | */ |
||
142 | public function makeEndPoint($action) |
||
146 | |||
147 | /** |
||
148 | * @param array $requestBody |
||
149 | * @return mixed |
||
150 | */ |
||
151 | protected function formatRequestBody(array $requestBody) |
||
155 | |||
156 | /** |
||
157 | * @param string $response |
||
158 | * @return array |
||
159 | */ |
||
160 | protected function parseResponse($response) |
||
164 | } |