Bluesky

 view release on metacpan or  search on metacpan

lib/Bluesky.pod  view on Meta::CPAN

=back

=head2 C<firehose( $callback, [ $url ] )>

Returns a new L<At::Protocol::Firehose> client for real-time streaming.

    my $fh = $bsky->firehose(sub ($header, $body, $err) { ... });
    $fh->start();

See L<At::Protocol::Firehose> for more details.

=head1 Feed and Content

Methods in this category create, modify, access, and delete content.

=head2 C<getTrendingTopics( [...] )>

    $bsky->getTrendingTopics( );

Get a list of trending topics.

Expected parameters include:

=over

=item C<viewer>

DID of the account making the request (not included for public/unauthenticated queries). Used to boost followed
accounts in ranking.

=item C<limit>

Integer.

Default: C<10>, Minimum: C<1>, Maximum: C<25>.

=back

=head2 C<getTimeline( [...] )>

    $bsky->getTimeline();

Get a view of the requesting account's home timeline. This is expected to some form of reverse-chronological feed.

Expected parameters include:

=over

=item C<algorithm>

Variant 'algorithm' for timeline. Implementation-specific.

NOTE: most feed flexibility has been moved to feed generator mechanism.

=item C<limit>

Integer.

Default: C<50>, Minimum: C<1>, Maximum: C<100>.

=item C<cursor>

=back

=head2 C<getFeed( ... )>

    $bsky->getFeed( 'at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.generator/3l6oveex3ii2l' );

Get a hydrated feed from a feed generator.

=head2 C<getFeedSkeleton( ... )>

    $bsky->getFeedSkeleton( 'at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.generator/3l6oveex3ii2l' );

Get a feed skeleton (list of URIs) from a feed generator.

=head2 C<getAuthorFeed( ... )>

    $bsky->getAuthorFeed( actor => 'sankorobinson.com' );

Get a view of an actor's 'author feed' (post and reposts by the author).

Expected parameters include:

=over

=item C<actor> - required

AT-identifier for the author.

=item C<limit>

Integer.

Default: C<50>, Minimum: C<1>, Maximum: C<100>.

=item C<cursor>

=item C<filter>

Combinations of post/repost types to include in response.

Known values:

=over

=item C<posts_with_replies> - default

=item C<posts_no_replies>

=item C<posts_with_media>

=item C<posts_and_author_threads>

=back

=item C<includePins>

Boolean value (false is default).

=back

An error is returned if the client is blocked by the actor.

=head2 C<getPostThread( ... )>

    $bsky->getPostThread( uri => 'at://bsky.app/app.bsky.feed.post/3l6oveex3ii2l' );

Get posts in a thread. Does not require auth, but additional metadata and filtering will be applied for authed
requests.

Expected parameters include:

=over

=item C<uri> - required

Reference (AT-URI) to post record.

=item C<depth>

How many levels of reply depth should be included in response.

Default: C<6>, Minimum: C<0>, Maximum: C<1000>.

=item C<parentHeight>

How many levels of parent (and grandparent, etc) post to include.

Default: C<80>, Minimum: C<0>, Maximum: C<1000>.

=back

Returns an error if the thread cannot be found.

=head2 C<getFeed( ... )>

lib/Bluesky.pod  view on Meta::CPAN

=head2 C<getPost( ... )>

    $bsky->getPost('at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.post/3l6oveex3ii2');

Gets a single post view for a specified post (by AT-URI).

Expected parameters include:

=over

=item C<uri> - required

AT-URI.

=back

=head2 C<getPosts( ... )>

    $bsky->getPosts(
        'at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.post/3l6oveex3ii2l',
        'at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.post/3lbvgvbvcf22c'
    );

Gets post views for a specified list of posts (by AT-URI). This is sometimes referred to as 'hydrating' a 'feed
skeleton'.

Expected parameters include:

=over

=item C<uris> - required

List of (up to 25) post AT-URIs to return hydrated views for.

=back

=head2 C<getLikes( ... )>

    $bsky->getLikes( uri => 'at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.post/3l6oveex3ii2l' );

Get like records which reference a subject (by AT-URI and CID).

Expected parameters include:

=over

=item C<uri> - required

AT-URI of the subject (eg, a post record).

=item C<cid>

CID of the subject record (aka, specific version of record), to filter likes.

=item C<limit>

Integer.

Default: 50, Minimum: 1, Maximum: 100.

=item C<cursor>

=back

=head2 C<getBookmarks( ... )>

    $bsky->getBookmarks();

Get private bookmarks for the authorized account.

=head2 C<createBookmark( ... )>

    $bsky->createBookmark( 'at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.post/3l6oveex3ii2l' );

Create a private bookmark for a post.

=head2 C<deleteBookmark( ... )>

    $bsky->deleteBookmark( 'at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.post/3l6oveex3ii2l' );

Delete a private bookmark.

=head2 C<getQuotes( ... )>

    $bsky->getQuotes( uri => 'at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.post/3l6oveex3ii2l' );

Get quotes of a post.

=head2 C<getActorLikes( ... )>

    $bsky->getActorLikes( actor => 'sankorobinson.com' );

Get a list of posts liked by an actor.

=head2 C<searchPosts( ... )>

    $bsky->searchPosts( q => 'perl' );

Find posts matching search criteria.

=head2 C<getSuggestedFeeds( ... )>

    $bsky->getSuggestedFeeds();

Get suggested feed generators.

=head2 C<describeFeedGenerator( )>

    $bsky->describeFeedGenerator();

Get information about a feed generator.

=head2 C<getFeedGenerator( ... )>

    $bsky->getFeedGenerator( 'at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.generator/3l6oveex3ii2l' );

Get information about a feed generator.

=head2 C<getFeedGenerators( ... )>

    $bsky->getFeedGenerators( feeds => [ ... ] );

lib/Bluesky.pod  view on Meta::CPAN


If undefined, the post is fetched to gather this for you.

=back

=head2 C<deleteRepost( ... )>

    $bsky->deleteRepost( 'at://did:plc:pwqewimhd3rxc4hg6ztwrcyj/app.bsky.feed.repost/3lcdwvquo7y25' );

Remove a repost record.

=head2 C<uploadBlob( ... )>

    $bsky->uploadBlob( $data, mime_type => 'image/png' );

Upload a blob (file/data) to the PDS. This is a wrapper around C<uploadFile>.

=head1 Social Graph

Methods documented in this section deal with relationships between the authorized user and other members of the social
network.

=head2 C<block( ... )>

    $bsky->block( 'sankorobinson.com' );

Blocks a user.

Expected parameters include:

=over

=item C<identifier> - required

Handle or DID of the person you'd like to block.

=back

=head2 C<getBlocks( ... )>

    $bsky->getBlocks( );

Enumerates which accounts the requesting account is currently blocking.

Requires auth.

Expected parameters include:

=over

=item C<uri>

AT-URI of the subject (eg, a post record).

=item C<limit>

Integer.

Default: 50, Minimum: 1, Maximum: 100.

=item C<cursor>

=back

Returns a list of actor profile views on success.

=head2 C<deleteBlock( ... )>

    $bsky->deleteBlock( 'at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.graph.block/3l6oveex3ii2l' );

Unblocks a user by removing the block record.

=head2 C<follow( ... )>

    $bsky->follow( 'sankorobinson.com' );

Follows a user.

=head2 C<deleteFollow( ... )>

    $bsky->deleteFollow( 'at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.graph.follow/3l6oveex3ii2l' );

Unfollows a user by removing the follow record.

=head2 C<getFollows( ... )>

    $bsky->getFollows( 'sankorobinson.com' );

Enumerates who an account is following.

=head2 C<getFollowers( ... )>

    $bsky->getFollowers( 'sankorobinson.com' );

Enumerates who is following an account.

=head2 C<getKnownFollowers( ... )>

    $bsky->getKnownFollowers( 'sankorobinson.com' );

Enumerates followers of an account that the authorized user also follows (mutuals).

=head2 C<getRelationships( ... )>

    $bsky->getRelationships( actors => ['sankorobinson.com', 'bsky.app'] );

Enumerates relationships between the authorized user and other actors.

=head2 C<getMutes( ... )>

    $bsky->getMutes();

Enumerate actors that the authorized user has muted.

=head2 C<muteThread( ... )>

    $bsky->muteThread( 'at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.post/3l6oveex3ii2l' );

Mute a thread.

=head2 C<unmuteThread( ... )>



( run in 1.101 second using v1.01-cache-2.11-cpan-8f98c5d2c55 )