ScheduledPostParams

public struct ScheduledPostParams : Codable, Equatable, Hashable, Sendable

Parameters to post a new scheduled post. Returned as part of a ScheduledPost. In requests, this is converted to a ScheduledPostRequest for encoding.

  • Creates parameters to create a new scheduled post

    Declaration

    Swift

    public init(text: String? = nil, mediaIds: [String]? = nil, sensitive: Bool? = nil, spoilerText: String? = nil, visibility: Post.Visibility, language: String? = nil, scheduledAt: Date? = nil, poll: CreatePoll? = nil, idempotency: String? = nil, inReplyToId: String? = nil, contentType: String? = nil, inReplyToConversationId: 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 text: 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]?
  • Text to be shown as a warning or subject before the actual content. Postes are generally collapsed behind this field.

    Declaration

    Swift

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

    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?
  • UTC Datetime at which to schedule a post.

    Declaration

    Swift

    public var scheduledAt: Date?
  • Poll options

    Declaration

    Swift

    public let poll: CreatePoll?
  • Unique post to prevent double posting

    Declaration

    Swift

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

    Declaration

    Swift

    public var inReplyToId: 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?
  • Declaration

    Swift

    public init(from decoder: Decoder) throws