Bluesky

 view release on metacpan or  search on metacpan

lib/Bluesky.pm  view on Meta::CPAN

    #
    class Bluesky {
        field $service      : param //= 'https://bsky.social';
        field $chat_service : param //= 'https://api.bsky.chat';
        field $at           : reader = At->new( host => $service );
        #
        method _at_for ($method) {
            if ( $method =~ /^chat\.bsky\./ ) {

                # Chat requests are proxied via the PDS.
                # Service ID fragment (#bsky_chat) is required.
                say '[DEBUG] [Bluesky] Proxying chat request...' if $ENV{DEBUG};
                $self->at->http->at_protocol_proxy('did:web:api.bsky.chat#bsky_chat');
                return $at;
            }

            # Ensure proxy is NOT used for standard repo/feed calls
            $self->at->http->at_protocol_proxy(undef);
            return $at;
        }
        method login ( $identifier, $password ) { $self->at->login( $identifier, $password ); }



( run in 1.807 second using v1.01-cache-2.11-cpan-b16cb0d3907 )