This commit is contained in:
f4ilji
2024-10-14 14:56:10 +05:00
parent 77b3e3b4b1
commit dd3a0c6ecd
258 changed files with 6548 additions and 1777 deletions
+33
View File
@@ -0,0 +1,33 @@
<?php
namespace App\Services\VK;
use App\Services\VK\Album\VkAlbumService;
use App\Services\VK\Wall\VkWallService;
use VK\Client\VKApiClient;
class VkService
{
protected VkWallService $wallService;
protected VkAlbumService $albumService;
public function __construct(VKApiClient $vk) {
$this->wallService = new VkWallService($vk);
$this->albumService = new VkAlbumService($vk);
}
public function getPosts(int $count = 10)
{
return $this->wallService->getPosts($count);
}
public function createPost(string $message, int $from_group = 1)
{
return $this->wallService->createPost($message, $from_group);
}
public function createAlbum(string $title)
{
return $this->albumService->createAlbum($title);
}
}