Skip to content

Commit

Permalink
Update bluesky-client.md
Browse files Browse the repository at this point in the history
  • Loading branch information
kawax committed Sep 2, 2024
1 parent d1060cf commit 43f2153
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions docs/bluesky-client.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,25 @@ Bluesky::login(identifier: config('bluesky.identifier'), password: config('blues
dump($response);
```

You can use `BlueskyMessage` class from [Laravel Notifications](./notification.md) as a text builder.

```php
use Revolution\Bluesky\Facades\Bluesky;
use Revolution\Bluesky\Notifications\BlueskyMessage;

$message = BlueskyMessage::create(text: 'test')
->text(PHP_EOL)
->link(text: 'http://', link: 'http://')
->text(PHP_EOL)
->tag(text: '#Laravel', tag: 'Laravel');

/** @var \Illuminate\Http\Client\Response $response */
Bluesky::login(identifier: config('bluesky.identifier'), password: config('bluesky.password'))
->post(text: $message->text, facets: $message->facets);

dump($response);
```

## Login
```php
use Revolution\Bluesky\Facades\Bluesky;
Expand Down

0 comments on commit 43f2153

Please sign in to comment.