Laravel AT Protocol Client (alpha & unstable)
1<?php
2
3namespace SocialDept\AtpClient;
4
5use SocialDept\AtpClient\Client\AtprotoClient;
6use SocialDept\AtpClient\Client\BskyClient;
7use SocialDept\AtpClient\Client\ChatClient;
8use SocialDept\AtpClient\Client\Client;
9use SocialDept\AtpClient\Client\OzoneClient;
10use SocialDept\AtpClient\Session\SessionManager;
11
12class AtpClient
13{
14 /**
15 * Raw API communication/networking class
16 */
17 public Client $client;
18
19 /**
20 * Collection of Bluesky (app.bsky.*) related functions
21 */
22 public BskyClient $bsky;
23
24 /**
25 * Collection of AT Protocol (com.atproto.*) related functions
26 */
27 public AtprotoClient $atproto;
28
29 /**
30 * Collection of Chat (chat.bsky.*) related functions
31 */
32 public ChatClient $chat;
33
34 /**
35 * Collection of Ozone (tools.ozone.*) related functions
36 */
37 public OzoneClient $ozone;
38
39 public function __construct(
40 SessionManager $sessions,
41 string $did,
42 ) {
43 // Load the network client
44 $this->client = new Client($this, $sessions, $did);
45
46 // Load all function collections
47 $this->bsky = new BskyClient($this);
48 $this->atproto = new AtprotoClient($this);
49 $this->chat = new ChatClient($this);
50 $this->ozone = new OzoneClient($this);
51 }
52}