diff --git a/VKAPI/Handlers/Users.php b/VKAPI/Handlers/Users.php index d1c29705..a44fb06c 100644 --- a/VKAPI/Handlers/Users.php +++ b/VKAPI/Handlers/Users.php @@ -2,6 +2,7 @@ namespace openvk\VKAPI\Handlers; use openvk\Web\Models\Entities\{User, Report}; use openvk\Web\Models\Repositories\Users as UsersRepo; +use openvk\Web\Models\Repositories\{Photos, Clubs, Albums, Videos, Notes, Audios}; use openvk\Web\Models\Repositories\Reports; final class Users extends VKAPIRequestHandler @@ -180,7 +181,16 @@ final class Users extends VKAPIRequestHandler break; case "rating": $response[$i]->rating = $usr->getRating(); - break; + break; + case "counters": + $response[$i]->counters = (object) [ + "friends_count" => $usr->getFriendsCount(), + "photos_count" => (new Albums)->getUserPhotosCount($usr), + "videos_count" => (new Videos)->getUserVideosCount($usr), + "audios_count" => (new Audios)->getUserCollectionSize($usr), + "notes_count" => (new Notes)->getUserNotesCount($usr), + ]; + break; } }