-
Notifications
You must be signed in to change notification settings - Fork 0
Finalize Beekeeper API #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -51,6 +51,7 @@ protected function defaultQuery(): array | |||
|
|
||||
| public function defaultBody(): array | ||||
| { | ||||
|
|
||||
|
||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,7 +20,8 @@ class CreateAPostInAGivenStream extends Request implements HasBody | |
|
|
||
| public function __construct( | ||
| protected readonly string $streamId, | ||
| protected readonly string $text, | ||
| protected readonly ?string $text = null, | ||
| protected readonly ?string $html = null, | ||
|
||
| protected readonly ?string $title = null, | ||
| protected null|array|Collection $labels = null, | ||
| protected readonly bool $sticky = false, | ||
|
|
@@ -55,14 +56,18 @@ public function defaultBody(): array | |
| { | ||
| $body = []; | ||
|
|
||
| if (filled($this->title)) { | ||
| $body = Arr::add(array: $body, key: 'title', value: $this->title); | ||
| } | ||
|
|
||
| if (filled($this->text)) { | ||
| $body = Arr::add(array: $body, key: 'text', value: $this->text); | ||
| } | ||
|
|
||
| if (filled($this->html)) { | ||
| $body = Arr::add(array: $body, key: 'html', value: $this->html); | ||
| } | ||
|
|
||
| if (filled($this->title)) { | ||
| $body = Arr::add(array: $body, key: 'title', value: $this->title); | ||
| } | ||
|
|
||
| $labels = $this->labels; | ||
|
|
||
| if ($labels instanceof Collection) { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The documentation shows that the
Postresponse object has anhtmlproperty, but the actualPostdata class atsrc/Data/Streams/Post.phpdoes not include this field. This documentation is misleading as thehtmlfield will not actually be available on the returnedPostobject until the data class is updated.This documentation should either be removed or the
Postdata class should be updated to include thehtmlproperty.