Skip to content

Commit c487110

Browse files
committed
добавил бан
1 parent 4c35175 commit c487110

File tree

4 files changed

+21
-3
lines changed

4 files changed

+21
-3
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
> Разрабатывается, юзабельна, если есть ошибки — сообщайте
66
77
### Методы
8+
* [Аккаунт (Account)](docs/Account.md)
89
* [Стена (Wall)](docs/Wall.md)
910
* [Лайки (Likes)](docs/Likes.md)
1011
* [Сообщения (Messages)](docs/Messages.md)
@@ -22,6 +23,8 @@ $user = new User("токен пж");
2223
/** ... дальше творим что хотим ... */
2324
```
2425

25-
Создатель говна [во вконтактике](https://vk.com/offnikgay)
26+
Создатель говна в соц сетях
27+
28+
[во вконтактике](https://vk.com/offnikgay)
2629

2730
[в телеграмчике](https://t.me/vyxel)

cache/temp_wallIDS.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
[110848,110840,110834,110832,110831,110828,110827,110825,110817,110815]
1+
[110848,110840,110834,110832,110831,110828,110827,110825,110817,110815,110853,110866,110858,110857,110877]

docs/Account.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# 🙋 Аккаунт (Account)
2+
3+
### Добавляет пользователя или группу в черный список
4+
5+
```php
6+
// $owner_id — Айди группы или пользователя
7+
ban(int $owner_id = 1)
8+
9+
// Пример
10+
$user->getAccount()->ban(1);
11+
```

src/Account.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,12 @@ public function __construct(User $user) {
88
$this->user = $user;
99
}
1010

11-
public function getId() {
11+
/*public function getId() {
1212
return $this->user->VkApiRequest()->api('account.getProfileInfo', [])['id'];
13+
}*/
14+
15+
public function ban(int $owner_id = 1) {
16+
return $this->user->VkApiRequest()->api('account.ban', ['owner_id' => $owner_id]);
1317
}
1418

1519
}

0 commit comments

Comments
 (0)