mirror of
https://gitea.phreedom.club/localhost_frssoft/bloat.git
synced 2025-05-06 03:48:45 +00:00
Add post format selection
This commit is contained in:
parent
ac4ff88adb
commit
591360f2a8
11 changed files with 66 additions and 15 deletions
|
@ -273,6 +273,7 @@ type Toot struct {
|
|||
Sensitive bool `json:"sensitive"`
|
||||
SpoilerText string `json:"spoiler_text"`
|
||||
Visibility string `json:"visibility"`
|
||||
ContentType string `json:"content_type"`
|
||||
}
|
||||
|
||||
// Mention hold information for mention.
|
||||
|
|
|
@ -266,6 +266,9 @@ func (c *Client) PostStatus(ctx context.Context, toot *Toot) (*Status, error) {
|
|||
if toot.SpoilerText != "" {
|
||||
params.Set("spoiler_text", toot.SpoilerText)
|
||||
}
|
||||
if toot.ContentType != "" {
|
||||
params.Set("content_type", toot.ContentType)
|
||||
}
|
||||
|
||||
var status Status
|
||||
err := c.doAPI(ctx, http.MethodPost, "/api/v1/statuses", params, &status, nil)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue