Something went wrong. Try again.
Laravel AT Protocol Client (alpha & unstable)
Something went wrong. Try again.
1.4 kB · 60 lines
PHP
at dev
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061<?php
namespace SocialDept\AtpClient\Client;
use SocialDept\AtpClient\AtpClient;use SocialDept\AtpClient\Client\Requests\Atproto;use SocialDept\AtpClient\Concerns\HasDomainExtensions;
class AtprotoClient{ use HasDomainExtensions; /** * The parent AtpClient instance */ protected AtpClient $atp;
/** * Repository operations (com.atproto.repo.*) */ public Atproto\RepoRequestClient $repo;
/** * Server operations (com.atproto.server.*) */ public Atproto\ServerRequestClient $server;
/** * Identity operations (com.atproto.identity.*) */ public Atproto\IdentityRequestClient $identity;
/** * Sync operations (com.atproto.sync.*) */ public Atproto\SyncRequestClient $sync;
public function __construct(AtpClient $parent) { $this->atp = $parent; $this->repo = new Atproto\RepoRequestClient($this); $this->server = new Atproto\ServerRequestClient($this); $this->identity = new Atproto\IdentityRequestClient($this); $this->sync = new Atproto\SyncRequestClient($this); }
protected function getDomainName(): string { return 'atproto'; }
protected function getRootClientClass(): string { return AtpClient::class; }
public function root(): AtpClient { return $this->atp; }}