Laravel AT Protocol Client (alpha & unstable)
3
fork

Configure Feed

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

Add Bsky public request clients for actor, feed, graph, and labeler

+181
+34
src/Client/Public/Requests/Bsky/ActorPublicRequestClient.php
··· 1 + <?php 2 + 3 + namespace SocialDept\AtpClient\Client\Public\Requests\Bsky; 4 + 5 + use SocialDept\AtpClient\Client\Public\Requests\PublicRequest; 6 + use SocialDept\AtpClient\Http\Response; 7 + 8 + class ActorPublicRequestClient extends PublicRequest 9 + { 10 + public function getProfile(string $actor): Response 11 + { 12 + return $this->atp->client->get('app.bsky.actor.getProfile', compact('actor')); 13 + } 14 + 15 + public function getProfiles(array $actors): Response 16 + { 17 + return $this->atp->client->get('app.bsky.actor.getProfiles', compact('actors')); 18 + } 19 + 20 + public function getSuggestions(int $limit = 50, ?string $cursor = null): Response 21 + { 22 + return $this->atp->client->get('app.bsky.actor.getSuggestions', compact('limit', 'cursor')); 23 + } 24 + 25 + public function searchActors(string $q, int $limit = 25, ?string $cursor = null): Response 26 + { 27 + return $this->atp->client->get('app.bsky.actor.searchActors', compact('q', 'limit', 'cursor')); 28 + } 29 + 30 + public function searchActorsTypeahead(string $q, int $limit = 10): Response 31 + { 32 + return $this->atp->client->get('app.bsky.actor.searchActorsTypeahead', compact('q', 'limit')); 33 + } 34 + }
+79
src/Client/Public/Requests/Bsky/FeedPublicRequestClient.php
··· 1 + <?php 2 + 3 + namespace SocialDept\AtpClient\Client\Public\Requests\Bsky; 4 + 5 + use SocialDept\AtpClient\Client\Public\Requests\PublicRequest; 6 + use SocialDept\AtpClient\Http\Response; 7 + 8 + class FeedPublicRequestClient extends PublicRequest 9 + { 10 + public function describeFeedGenerator(): Response 11 + { 12 + return $this->atp->client->get('app.bsky.feed.describeFeedGenerator'); 13 + } 14 + 15 + public function getAuthorFeed(string $actor, int $limit = 50, ?string $cursor = null, ?string $filter = null): Response 16 + { 17 + return $this->atp->client->get('app.bsky.feed.getAuthorFeed', compact('actor', 'limit', 'cursor', 'filter')); 18 + } 19 + 20 + public function getActorFeeds(string $actor, int $limit = 50, ?string $cursor = null): Response 21 + { 22 + return $this->atp->client->get('app.bsky.feed.getActorFeeds', compact('actor', 'limit', 'cursor')); 23 + } 24 + 25 + public function getActorLikes(string $actor, int $limit = 50, ?string $cursor = null): Response 26 + { 27 + return $this->atp->client->get('app.bsky.feed.getActorLikes', compact('actor', 'limit', 'cursor')); 28 + } 29 + 30 + public function getFeed(string $feed, int $limit = 50, ?string $cursor = null): Response 31 + { 32 + return $this->atp->client->get('app.bsky.feed.getFeed', compact('feed', 'limit', 'cursor')); 33 + } 34 + 35 + public function getFeedGenerator(string $feed): Response 36 + { 37 + return $this->atp->client->get('app.bsky.feed.getFeedGenerator', compact('feed')); 38 + } 39 + 40 + public function getFeedGenerators(array $feeds): Response 41 + { 42 + return $this->atp->client->get('app.bsky.feed.getFeedGenerators', compact('feeds')); 43 + } 44 + 45 + public function getLikes(string $uri, int $limit = 50, ?string $cursor = null, ?string $cid = null): Response 46 + { 47 + return $this->atp->client->get('app.bsky.feed.getLikes', compact('uri', 'limit', 'cursor', 'cid')); 48 + } 49 + 50 + public function getPostThread(string $uri, int $depth = 6, int $parentHeight = 80): Response 51 + { 52 + return $this->atp->client->get('app.bsky.feed.getPostThread', compact('uri', 'depth', 'parentHeight')); 53 + } 54 + 55 + public function getPosts(array $uris): Response 56 + { 57 + return $this->atp->client->get('app.bsky.feed.getPosts', compact('uris')); 58 + } 59 + 60 + public function getQuotes(string $uri, int $limit = 50, ?string $cursor = null, ?string $cid = null): Response 61 + { 62 + return $this->atp->client->get('app.bsky.feed.getQuotes', compact('uri', 'limit', 'cursor', 'cid')); 63 + } 64 + 65 + public function getRepostedBy(string $uri, int $limit = 50, ?string $cursor = null, ?string $cid = null): Response 66 + { 67 + return $this->atp->client->get('app.bsky.feed.getRepostedBy', compact('uri', 'limit', 'cursor', 'cid')); 68 + } 69 + 70 + public function getSuggestedFeeds(int $limit = 50, ?string $cursor = null): Response 71 + { 72 + return $this->atp->client->get('app.bsky.feed.getSuggestedFeeds', compact('limit', 'cursor')); 73 + } 74 + 75 + public function searchPosts(string $q, int $limit = 25, ?string $cursor = null, ?string $sort = null): Response 76 + { 77 + return $this->atp->client->get('app.bsky.feed.searchPosts', compact('q', 'limit', 'cursor', 'sort')); 78 + } 79 + }
+54
src/Client/Public/Requests/Bsky/GraphPublicRequestClient.php
··· 1 + <?php 2 + 3 + namespace SocialDept\AtpClient\Client\Public\Requests\Bsky; 4 + 5 + use SocialDept\AtpClient\Client\Public\Requests\PublicRequest; 6 + use SocialDept\AtpClient\Http\Response; 7 + 8 + class GraphPublicRequestClient extends PublicRequest 9 + { 10 + public function getFollowers(string $actor, int $limit = 50, ?string $cursor = null): Response 11 + { 12 + return $this->atp->client->get('app.bsky.graph.getFollowers', compact('actor', 'limit', 'cursor')); 13 + } 14 + 15 + public function getFollows(string $actor, int $limit = 50, ?string $cursor = null): Response 16 + { 17 + return $this->atp->client->get('app.bsky.graph.getFollows', compact('actor', 'limit', 'cursor')); 18 + } 19 + 20 + public function getKnownFollowers(string $actor, int $limit = 50, ?string $cursor = null): Response 21 + { 22 + return $this->atp->client->get('app.bsky.graph.getKnownFollowers', compact('actor', 'limit', 'cursor')); 23 + } 24 + 25 + public function getList(string $list, int $limit = 50, ?string $cursor = null): Response 26 + { 27 + return $this->atp->client->get('app.bsky.graph.getList', compact('list', 'limit', 'cursor')); 28 + } 29 + 30 + public function getLists(string $actor, int $limit = 50, ?string $cursor = null): Response 31 + { 32 + return $this->atp->client->get('app.bsky.graph.getLists', compact('actor', 'limit', 'cursor')); 33 + } 34 + 35 + public function getRelationships(string $actor, array $others = []): Response 36 + { 37 + return $this->atp->client->get('app.bsky.graph.getRelationships', compact('actor', 'others')); 38 + } 39 + 40 + public function getStarterPack(string $starterPack): Response 41 + { 42 + return $this->atp->client->get('app.bsky.graph.getStarterPack', compact('starterPack')); 43 + } 44 + 45 + public function getStarterPacks(array $uris): Response 46 + { 47 + return $this->atp->client->get('app.bsky.graph.getStarterPacks', compact('uris')); 48 + } 49 + 50 + public function getSuggestedFollowsByActor(string $actor): Response 51 + { 52 + return $this->atp->client->get('app.bsky.graph.getSuggestedFollowsByActor', compact('actor')); 53 + } 54 + }
+14
src/Client/Public/Requests/Bsky/LabelerPublicRequestClient.php
··· 1 + <?php 2 + 3 + namespace SocialDept\AtpClient\Client\Public\Requests\Bsky; 4 + 5 + use SocialDept\AtpClient\Client\Public\Requests\PublicRequest; 6 + use SocialDept\AtpClient\Http\Response; 7 + 8 + class LabelerPublicRequestClient extends PublicRequest 9 + { 10 + public function getServices(array $dids, bool $detailed = false): Response 11 + { 12 + return $this->atp->client->get('app.bsky.labeler.getServices', compact('dids', 'detailed')); 13 + } 14 + }