MessagesApi
@interface MessagesApi : NodeDependant
Provides access to Textile messages related APIs
-
Add a text message to a thread
Declaration
Objective-C
- (nonnull NSString *)add:(nonnull NSString *)threadId body:(nonnull NSString *)body error:(NSError *_Nullable *_Nullable)error;Swift
func add(_ threadId: String, body: String, error: NSErrorPointer) -> StringParameters
threadIdThe id of the thread to add the message to
bodyThe body of the message
errorA reference to an error pointer that will be set in the case of an error
Return Value
The hash of the newly created message block
-
List messages for a thread
Declaration
Objective-C
- (id)list:(nullable NSString *)offset limit:(long)limit threadId:(nonnull NSString *)threadId error:(NSError *_Nullable *_Nullable)error;Swift
func list(_ offset: String?, limit: Int, threadId: String) throws -> AnyParameters
offsetThe offset to query from
limitThe max number of messages to return
threadIdThe id of the thread to query
errorA reference to an error pointer that will be set in the case of an error
Return Value
An object containing a list of messages
View on GitHub
MessagesApi Class Reference