EkoMessageEditor

@interface EkoMessageEditor : NSObject

A editor encapsulates methods for managing messages.

  • The context used to create the instance.

    Declaration

    Objective-C

    @property (readonly, strong, nonatomic, nonnull) EkoClient *client;

    Swift

    var client: EkoClient { get }
  • The message Id associated with the instance.

    Declaration

    Objective-C

    @property (readonly, strong, nonatomic, nonnull) NSString *messageId;

    Swift

    var messageId: String { get }
  • Designated intializer.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithClient:(nonnull EkoClient *)client
                                 messageId:(nonnull NSString *)messageId;

    Swift

    init(client: EkoClient, messageId: String)

    Parameters

    client

    A valid context instance.

  • Edits the text message.

    Declaration

    Objective-C

    - (void)editText:(nonnull NSString *)text
          completion:(EkoRequestCompletion _Nullable)completion;

    Swift

    func editText(_ text: String, completion: EkoRequestCompletion? = nil)

    Parameters

    text

    The new text

    completion

    A block executed when the request has completed.

  • Edits the custom message.

    Declaration

    Objective-C

    - (void)editCustomMessage:(nonnull NSDictionary<NSString *, id> *)customMessage
                   completion:(EkoRequestCompletion _Nullable)completion;

    Swift

    func editCustomMessage(_ customMessage: [String : Any], completion: EkoRequestCompletion? = nil)

    Parameters

    text

    The new custom message

    completion

    A block executed when the request has completed..

  • Deletes the message.

    Declaration

    Objective-C

    - (void)deleteWithCompletion:(nullable EkoRequestCompletion)completion;

    Swift

    func delete(completion: EkoRequestCompletion? = nil)

    Parameters

    completion

    A block executed when the request has completed.

  • Unavailable

    Block call of init and new because this object cannot be created directly.

    Declaration

    Objective-C

    - (nonnull instancetype)init;