EkoUserFlagger

@interface EkoUserFlagger : NSObject

A editor encapsulates methods for managing messages

  • The context used to create the instance

    Declaration

    Objective-C

    @property (readonly, strong, nonatomic, nonnull) EkoClient *client;

    Swift

    var client: EkoClient { get }
  • The user Id associated with the instance

    Declaration

    Objective-C

    @property (readonly, strong, nonatomic, nonnull) EkoUser *user;

    Swift

    var user: EkoUser { get }
  • Designated intializer

    Declaration

    Objective-C

    - (nonnull instancetype)initWithClient:(nonnull EkoClient *)client
                                      user:(nonnull EkoUser *)user;

    Swift

    init(client: EkoClient, user: EkoUser)

    Parameters

    client

    A valid context instance

  • Flags user, this is reported to the admin panel for the moderators to see

    Declaration

    Objective-C

    - (void)flagWithCompletion:(EkoRequestCompletion _Nullable)completion;

    Swift

    func flag(completion: EkoRequestCompletion? = nil)
  • Unflags the user

    Declaration

    Objective-C

    - (void)unflagWithCompletion:(EkoRequestCompletion _Nullable)completion;

    Swift

    func unflag(completion: EkoRequestCompletion? = nil)
  • The callback returns whether the logged-in user has flagged this user

    Declaration

    Objective-C

    - (void)isFlagByMeWithCompletion:(void (^_Nonnull)(BOOL))completion;

    Swift

    func isFlagByMe(completion: @escaping (Bool) -> Void)
  • Unavailable

    Block call of init and new because this object cannot be created directly

    Declaration

    Objective-C

    - (nonnull instancetype)init;