Laravel AT Protocol Client (alpha & unstable)

Update AtpClient constructor for dual-mode support

Changed files
+14 -4
src
+14 -4
src/AtpClient.php
··· 13 13 class AtpClient 14 14 { 15 15 use HasExtensions; 16 + 16 17 /** 17 18 * Raw API communication/networking class 18 19 */ ··· 39 40 public OzoneClient $ozone; 40 41 41 42 public function __construct( 42 - SessionManager $sessions, 43 - string $did, 43 + ?SessionManager $sessions = null, 44 + ?string $did = null, 45 + ?string $serviceUrl = null, 44 46 ) { 45 - // Load the network client 46 - $this->client = new Client($this, $sessions, $did); 47 + // Load the network client (supports both public and authenticated modes) 48 + $this->client = new Client($this, $sessions, $did, $serviceUrl); 47 49 48 50 // Load all function collections 49 51 $this->bsky = new BskyClient($this); 50 52 $this->atproto = new AtprotoClient($this); 51 53 $this->chat = new ChatClient($this); 52 54 $this->ozone = new OzoneClient($this); 55 + } 56 + 57 + /** 58 + * Check if client is in public mode (no authentication). 59 + */ 60 + public function isPublicMode(): bool 61 + { 62 + return $this->client->isPublicMode(); 53 63 } 54 64 }