MembersAPI

public enum MembersAPI

Caseless enumeration with static methods to send Members Requests

  • Sends a request to get connections from the API

    Declaration

    Swift

    public static func getConnections(with parameters: Parameters?,
                                      completion: ResponseCompletion<[Member]> = nil)

    Parameters

    parameters

    The Parameters to apply.

    completion

    The closure to be executed once the request has finished.

  • Sends a request to get the list of members from the API

    Declaration

    Swift

    public static func getMembers(with parameters: Parameters?,
                                  completion: ResponseCompletion<[Member]> = nil)

    Parameters

    parameters

    The Parameters to apply.

    completion

    The closure to be executed once the request has finished.

  • Sends a request to add another member as a connection from the API

    Declaration

    Swift

    public static func acceptConnection(memberID: String,
                                        completion: ResponseCompletion<Bool> = nil)

    Parameters

    memberID

    The ID of the member to add as a connection.

    completion

    The closure to be executed once the request has finished.

  • Sends a request to connect to a member from the API

    Declaration

    Swift

    public static func connect(memberID: String,
                               message: String,
                               completion: ResponseCompletion<Bool> = nil)

    Parameters

    memberID

    The ID of the member the user wants to connect to

    message

    The message the user wishes to send.

    completion

    The closure to be executed once the request has finished.

  • Sends a request to get the member details from the API

    Declaration

    Swift

    public static func get(memberID: String,
                           completion: ResponseCompletion<Member> = nil)

    Parameters

    memberID

    The ID of the member.

    completion

    The closure to be executed once the request has finished.

  • Sends a request to encrypt a member attribute from the API

    Declaration

    Swift

    public static func encrypt(memberAttribute: String,
                               completion: ResponseCompletion<Bool> = nil)

    Parameters

    memberAttribute

    The attribute to be encrypted.

    completion

    The closure to be executed once the request has finished.