ContactsApi
@interface ContactsApi : NodeDependant
Provides access to Textile contacts related APIs
-
Add a new Contact to the account’s list of Contacts
Declaration
Objective-C
- (void)add:(id)contact error:(NSError *_Nullable *_Nullable)error;Swift
func add(_ contact: Any!, error: NSErrorPointer)Parameters
contactThe new contact to add, usually returned from a Contact search
errorA reference to an error pointer that will be set in the case of an error
-
Get a Contact by address from list of existing Contacts
Declaration
Objective-C
- (id)get:(nonnull NSString *)address error:(NSError *_Nullable *_Nullable)error;Swift
func get(_ address: String) throws -> AnyParameters
addressThe address of the Contact to retrieve
errorA reference to an error pointer that will be set in the case of an error
Return Value
The Contact object corresponding to the address
-
List all existing account Contacts
Declaration
Objective-C
- (id)list:(NSError *_Nullable *_Nullable)error;Swift
func list() throws -> AnyParameters
errorA reference to an error pointer that will be set in the case of an error
Return Value
An object containing a list of all account contacts
-
Remove a Contact from the account by address
Declaration
Objective-C
- (void)remove:(nonnull NSString *)address error:(NSError *_Nullable *_Nullable)error;Swift
func remove(_ address: String, error: NSErrorPointer)Parameters
addressThe address of the contact to remove
errorA reference to an error pointer that will be set in the case of an error
-
List all threads a particular contact and the local node account participate in
Declaration
Objective-C
- (id)threads:(nonnull NSString *)address error:(NSError *_Nullable *_Nullable)error;Swift
func threads(_ address: String) throws -> AnyParameters
addressThe contact address to find threads for
errorA reference to an error pointer that will be set in the case of an error
Return Value
An object containing a list of all threads the contact and the local node account participate in
-
Search for Textile Contacts across the entire network
Declaration
Objective-C
- (id)search:(id)query options:(id)options error:(NSError *_Nullable *_Nullable)error;Swift
func search(_ query: Any!, options: Any!) throws -> AnyParameters
queryA query object describing the search to execute
optionsA query options object to control the behavior of the search
errorA reference to an error pointer that will be set in the case of an error
Return Value
A handle that can be used to cancel the search
View on GitHub
ContactsApi Class Reference