PostParams

public struct PostParams : Codable, Sendable

Parameters to create a new post

  • Creates an object to create a new post with

    Declaration

    Swift

    public init(post: String,
                mediaIds: [String]? = nil,
                poll: CreatePoll? = nil,
                inReplyToId: String? = nil,
                sensitive: Bool? = nil,
                spoilerText: String? = nil,
                visibility: Post.Visibility,
                language: String? = nil,
                contentType: String? = nil,
                inReplyToConversationId: String? = nil)
  • Undocumented

    Declaration

    Swift

    public init(post: String, visibility: Post.Visibility, spoilerText: String? = nil)
  • The text content of the post. If media_ids is provided, this becomes optional. Attaching a poll is optional while post is provided.

    Declaration

    Swift

    public var post: String
  • Include Attachment IDs to be attached as media. If provided, post becomes optional, and poll cannot be used.

    Declaration

    Swift

    public var mediaIds: [String]?
  • Poll options

    Declaration

    Swift

    public var poll: CreatePoll?
  • ID of the post being replied to, if post is a reply.

    Declaration

    Swift

    public var inReplyToId: String?
  • Mark post and attached media as sensitive? Defaults to false.

    Declaration

    Swift

    public var sensitive: Bool?
  • Text to be shown as a warning or subject before the actual content. Posts are generally collapsed behind this field.

    Declaration

    Swift

    public var spoilerText: String?
  • Sets the visibility of the posted post to public, unlisted, private, direct.

    Declaration

    Swift

    public var visibility: Post.Visibility
  • ISO 639 language code for this post.

    Declaration

    Swift

    public var language: String?
  • (Pleroma) The MIME type of the post, it is transformed into HTML by the backend. You can get the list of the supported MIME types with the nodeinfo endpoint.

    Declaration

    Swift

    public var contentType: String?
  • (Pleroma) Will reply to a given conversation, addressing only the people who are part of the recipient set of that conversation. Sets the visibility to direct.

    Declaration

    Swift

    public var inReplyToConversationId: String?