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
completionA 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
filterA 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
userIdsAn array of users Ids to add
completionA 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
userIdsAn array of users Ids to remove
completionA 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
initandnewbecause this object cannot be created directlyDeclaration
Objective-C
- (nonnull instancetype)init;
EkoChannelParticipation Class Reference