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