Laravel AT Protocol Client (alpha & unstable)

Merge branch 'refs/heads/dev'

Changed files
+2 -6
src
Client
Requests
+2 -6
src/Client/Requests/Bsky/ActorRequestClient.php
··· 4 5 use SocialDept\AtpClient\Attributes\PublicEndpoint; 6 use SocialDept\AtpClient\Client\Requests\Request; 7 - use SocialDept\AtpClient\Data\Record; 8 use SocialDept\AtpClient\Data\Responses\Bsky\Actor\GetProfilesResponse; 9 use SocialDept\AtpClient\Data\Responses\Bsky\Actor\GetSuggestionsResponse; 10 use SocialDept\AtpClient\Data\Responses\Bsky\Actor\SearchActorsResponse; ··· 20 * @see https://docs.bsky.app/docs/api/app-bsky-actor-get-profile 21 */ 22 #[PublicEndpoint] 23 - public function getProfile(string $actor): Record 24 { 25 $response = $this->atp->client->get( 26 endpoint: BskyActor::GetProfile, 27 params: compact('actor') 28 ); 29 30 - return Record::fromArray( 31 - data: $response->toArray(), 32 - transformer: fn($value) => ProfileViewDetailed::fromArray($response->json('value')) 33 - ); 34 } 35 36 /**
··· 4 5 use SocialDept\AtpClient\Attributes\PublicEndpoint; 6 use SocialDept\AtpClient\Client\Requests\Request; 7 use SocialDept\AtpClient\Data\Responses\Bsky\Actor\GetProfilesResponse; 8 use SocialDept\AtpClient\Data\Responses\Bsky\Actor\GetSuggestionsResponse; 9 use SocialDept\AtpClient\Data\Responses\Bsky\Actor\SearchActorsResponse; ··· 19 * @see https://docs.bsky.app/docs/api/app-bsky-actor-get-profile 20 */ 21 #[PublicEndpoint] 22 + public function getProfile(string $actor): ProfileViewDetailed 23 { 24 $response = $this->atp->client->get( 25 endpoint: BskyActor::GetProfile, 26 params: compact('actor') 27 ); 28 29 + return ProfileViewDetailed::fromArray($response->toArray()); 30 } 31 32 /**