EkoChannelParticipation
@interface EkoChannelParticipation : NSObject
A membership encapsulates methods for managing users in a channel
-
The channel Id associated with the instance
Declaration
Objective-C
@property (readonly, strong, nonatomic, nonnull) NSString *channelId;
Swift
var channelId: String { get }
-
The memberships associated with the channel
Declaration
Objective-C
@property (readonly, strong, nonatomic, nonnull) EkoCollection<EkoChannelMembership *> *memberships;
Swift
var memberships: EkoCollection<EkoChannelMembership> { get }
-
Leaves the channel for the current user
Declaration
Objective-C
- (void)leaveWithCompletion:(EkoRequestCompletion _Nullable)completion;
Swift
func leave(completion: EkoRequestCompletion? = nil)
Parameters
completion
A block executed when the request has completed
-
Gets the members associated with the instance filtered by the filter parameter
Declaration
Objective-C
- (nonnull EkoCollection<EkoChannelMembership *> *)membershipsForFilter: (EkoChannelMembershipFilter)filter;
Swift
func memberships(for filter: EkoChannelMembershipFilter) -> EkoCollection<EkoChannelMembership>
Parameters
filter
A vaild EkoChannelMembershipFilter enum option
-
Adds users to the channel
Declaration
Objective-C
- (void)addUsers:(nonnull NSArray<NSString *> *)userIds completion:(EkoRequestCompletion _Nullable)completion;
Swift
func addUsers(_ userIds: [String], completion: EkoRequestCompletion? = nil)
Parameters
userIds
An array of users Ids to add
completion
A block executed when the request has completed
-
Removes users from the channel
Declaration
Objective-C
- (void)removeUsers:(nonnull NSArray<NSString *> *)userIds completion:(EkoRequestCompletion _Nullable)completion;
Swift
func removeUsers(_ userIds: [String], completion: EkoRequestCompletion? = nil)
Parameters
userIds
An array of users Ids to remove
completion
A block executed when the request has completed
-
Let the server know that the user is currently viewing this channel (this automatically updates the user’s readToSegment) A user can read multiple channels at the same time.
Declaration
Objective-C
- (void)startReading;
Swift
func startReading()
-
Let the server know that the user has stopped reading this channel (this automatically updates the user’s readToSegment)
Declaration
Objective-C
- (void)stopReading;
Swift
func stopReading()
-
Unavailable
Block call of
init
andnew
because this object cannot be created directlyDeclaration
Objective-C
- (nonnull instancetype)init;