Laravel AT Protocol Client (alpha & unstable)
3
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add domain extension support to all domain clients

+74
+12
src/Client/AtprotoClient.php
··· 4 4 5 5 use SocialDept\AtpClient\AtpClient; 6 6 use SocialDept\AtpClient\Client\Requests\Atproto; 7 + use SocialDept\AtpClient\Concerns\HasDomainExtensions; 7 8 8 9 class AtprotoClient 9 10 { 11 + use HasDomainExtensions; 10 12 /** 11 13 * The parent AtpClient instance 12 14 */ ··· 39 41 $this->server = new Atproto\ServerRequestClient($this); 40 42 $this->identity = new Atproto\IdentityRequestClient($this); 41 43 $this->sync = new Atproto\SyncRequestClient($this); 44 + } 45 + 46 + protected function getDomainName(): string 47 + { 48 + return 'atproto'; 49 + } 50 + 51 + protected function getRootClientClass(): string 52 + { 53 + return AtpClient::class; 42 54 } 43 55 }
+12
src/Client/BskyClient.php
··· 8 8 use SocialDept\AtpClient\Client\Records\PostRecordClient; 9 9 use SocialDept\AtpClient\Client\Records\ProfileRecordClient; 10 10 use SocialDept\AtpClient\Client\Requests\Bsky; 11 + use SocialDept\AtpClient\Concerns\HasDomainExtensions; 11 12 12 13 class BskyClient 13 14 { 15 + use HasDomainExtensions; 14 16 /** 15 17 * The parent AtpClient instance 16 18 */ ··· 55 57 $this->profile = new ProfileRecordClient($this); 56 58 $this->like = new LikeRecordClient($this); 57 59 $this->follow = new FollowRecordClient($this); 60 + } 61 + 62 + protected function getDomainName(): string 63 + { 64 + return 'bsky'; 65 + } 66 + 67 + protected function getRootClientClass(): string 68 + { 69 + return AtpClient::class; 58 70 } 59 71 }
+12
src/Client/ChatClient.php
··· 4 4 5 5 use SocialDept\AtpClient\AtpClient; 6 6 use SocialDept\AtpClient\Client\Requests\Chat; 7 + use SocialDept\AtpClient\Concerns\HasDomainExtensions; 7 8 8 9 class ChatClient 9 10 { 11 + use HasDomainExtensions; 10 12 /** 11 13 * The parent AtpClient instance 12 14 */ ··· 27 29 $this->atp = $parent; 28 30 $this->convo = new Chat\ConvoRequestClient($this); 29 31 $this->actor = new Chat\ActorRequestClient($this); 32 + } 33 + 34 + protected function getDomainName(): string 35 + { 36 + return 'chat'; 37 + } 38 + 39 + protected function getRootClientClass(): string 40 + { 41 + return AtpClient::class; 30 42 } 31 43 }
+12
src/Client/OzoneClient.php
··· 4 4 5 5 use SocialDept\AtpClient\AtpClient; 6 6 use SocialDept\AtpClient\Client\Requests\Ozone; 7 + use SocialDept\AtpClient\Concerns\HasDomainExtensions; 7 8 8 9 class OzoneClient 9 10 { 11 + use HasDomainExtensions; 10 12 /** 11 13 * The parent AtpClient instance 12 14 */ ··· 33 35 $this->moderation = new Ozone\ModerationRequestClient($this); 34 36 $this->server = new Ozone\ServerRequestClient($this); 35 37 $this->team = new Ozone\TeamRequestClient($this); 38 + } 39 + 40 + protected function getDomainName(): string 41 + { 42 + return 'ozone'; 43 + } 44 + 45 + protected function getRootClientClass(): string 46 + { 47 + return AtpClient::class; 36 48 } 37 49 }
+13
src/Client/Public/AtprotoPublicClient.php
··· 3 3 namespace SocialDept\AtpClient\Client\Public; 4 4 5 5 use SocialDept\AtpClient\Client\Public\Requests\Atproto\IdentityPublicRequestClient; 6 + use SocialDept\AtpClient\Concerns\HasDomainExtensions; 6 7 7 8 class AtprotoPublicClient 8 9 { 10 + use HasDomainExtensions; 11 + 9 12 public AtpPublicClient $atp; 10 13 public IdentityPublicRequestClient $identity; 11 14 ··· 13 16 { 14 17 $this->atp = $parent; 15 18 $this->identity = new IdentityPublicRequestClient($this); 19 + } 20 + 21 + protected function getDomainName(): string 22 + { 23 + return 'atproto'; 24 + } 25 + 26 + protected function getRootClientClass(): string 27 + { 28 + return AtpPublicClient::class; 16 29 } 17 30 }
+13
src/Client/Public/BskyPublicClient.php
··· 6 6 use SocialDept\AtpClient\Client\Public\Requests\Bsky\FeedPublicRequestClient; 7 7 use SocialDept\AtpClient\Client\Public\Requests\Bsky\GraphPublicRequestClient; 8 8 use SocialDept\AtpClient\Client\Public\Requests\Bsky\LabelerPublicRequestClient; 9 + use SocialDept\AtpClient\Concerns\HasDomainExtensions; 9 10 10 11 class BskyPublicClient 11 12 { 13 + use HasDomainExtensions; 14 + 12 15 public AtpPublicClient $atp; 13 16 public ActorPublicRequestClient $actor; 14 17 public FeedPublicRequestClient $feed; ··· 22 25 $this->feed = new FeedPublicRequestClient($this); 23 26 $this->graph = new GraphPublicRequestClient($this); 24 27 $this->labeler = new LabelerPublicRequestClient($this); 28 + } 29 + 30 + protected function getDomainName(): string 31 + { 32 + return 'bsky'; 33 + } 34 + 35 + protected function getRootClientClass(): string 36 + { 37 + return AtpPublicClient::class; 25 38 } 26 39 }