Something went wrong. Try again.
Laravel AT Protocol Client (alpha & unstable)
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849<?php
namespace SocialDept\AtpClient\Client\Requests\Atproto;
use SocialDept\AtpClient\Attributes\PublicEndpoint;use SocialDept\AtpClient\Attributes\ScopedEndpoint;use SocialDept\AtpClient\Client\Requests\Request;use SocialDept\AtpClient\Data\Responses\Atproto\Identity\ResolveHandleResponse;use SocialDept\AtpClient\Data\Responses\EmptyResponse;use SocialDept\AtpClient\Enums\Nsid\AtprotoIdentity;use SocialDept\AtpClient\Enums\Scope;
class IdentityRequestClient extends Request{ /** * Resolve handle to DID * * @see https://docs.bsky.app/docs/api/com-atproto-identity-resolve-handle */ #[PublicEndpoint] public function resolveHandle(string $handle): ResolveHandleResponse { $response = $this->atp->client->get( endpoint: AtprotoIdentity::ResolveHandle, params: compact('handle') );
return ResolveHandleResponse::fromArray($response->json()); }
/** * Update handle * * @requires atproto (identity:handle) * * @see https://docs.bsky.app/docs/api/com-atproto-identity-update-handle */ #[ScopedEndpoint(Scope::Atproto, granular: 'identity:handle')] public function updateHandle(string $handle): EmptyResponse { $this->atp->client->post( endpoint: AtprotoIdentity::UpdateHandle, body: compact('handle') );
return new EmptyResponse; }}