LCPaasClient
Objective-C
@interface LCPaasClient : NSObject
@property (nonatomic) LCApplication *application;
@property (nonatomic, readonly, copy) NSString *apiVersion;
@property (nonatomic) LCUser *currentUser;
@property (nonatomic) LCACL *defaultACL;
@property (nonatomic) BOOL currentUserAccessForDefaultACL;
@property (nonatomic) NSTimeInterval timeoutInterval;
@property (nonatomic) NSMutableDictionary *subclassTable;
@property (nonatomic) BOOL productionMode;
@property (nonatomic) BOOL isLastModifyEnabled;
@property (nonatomic) NSLock *lock;
@property (nonatomic) NSMapTable *requestTable;
@property (nonatomic) LCURLSessionManager *sessionManager;
@property (nonatomic) dispatch_queue_t completionQueue;
@property (nonatomic) NSMutableSet *runningArchivedRequests;
@property (atomic) NSMutableDictionary *lastModify;
+ (LCPaasClient *)sharedInstance;
-(void)clearLastModifyCache;
- (LCACL *)updatedDefaultACL;
+(NSMutableDictionary *)batchMethod:(NSString *)method
path:(NSString *)path
body:(NSDictionary *)body
parameters:(NSDictionary *)parameters;
+(void)updateBatchMethod:(NSString *)method
path:(NSString *)path
dict:(NSMutableDictionary *)dict;
- (void)getObject:(NSString *)path
withParameters:(NSDictionary *)parameters
block:(LCIdResultBlock)block;
- (void)getObject:(NSString *)path
paddingVersion:(BOOL)paddingVersion
withParameters:(NSDictionary *)parameters
block:(LCIdResultBlock)block;
- (void)getObject:(NSString *)path
withParameters:(NSDictionary *)parameters
block:(LCIdResultBlock)block
wait:(BOOL)wait;
- (void)getObject:(NSString *)path
paddingVersion:(BOOL)paddingVersion
withParameters:(NSDictionary *)parameters
block:(LCIdResultBlock)block
wait:(BOOL)wait;
- (void)getObject:(NSString *)path
withParameters:(NSDictionary *)parameters
policy:(LCCachePolicy)policy
maxCacheAge:(NSTimeInterval)maxCacheAge
block:(LCIdResultBlock)block;
- (void)putObject:(NSString *)path
withParameters:(NSDictionary *)parameters
sessionToken:(NSString *)sessionToken
block:(LCIdResultBlock)block;
- (void)postBatchObject:(NSArray *)parameterArray
block:(LCArrayResultBlock)block;
- (void)postBatchObject:(NSArray *)parameterArray
headerMap:(NSDictionary *)headerMap
block:(LCArrayResultBlock)block
wait:(BOOL)wait;
-(void)postBatchSaveObject:(NSArray *)parameterArray headerMap:(NSDictionary *)headerMap eventually:(BOOL)isEventually block:(LCIdResultBlock)block;
- (void)postObject:(NSString *)path withParameters:(id)parameters block:(LCIdResultBlock)block;
- (void)postObject:(NSString *)path withParameters:(id)parameters eventually:(BOOL)isEventually block:(LCIdResultBlock)block;
-(void)deleteObject:(NSString *)path
withParameters:(NSDictionary *)parameters
block:(LCIdResultBlock)block;
- (void)deleteObject:(NSString *)path
withParameters:(NSDictionary *)parameters
eventually:(BOOL)isEventually
block:(LCIdResultBlock)block;
- (NSString *)absoluteStringFromPath:(NSString *)path parameters:(NSDictionary *)parameters;
-(BOOL)addSubclassMapEntry:(NSString *)parseClassName
classObject:(Class)object;
-(Class)classFor:(NSString *)parseClassName;
// offline
// TODO: never called this yet!
- (void)handleAllArchivedRequests;
#pragma mark - Network Utils
/*!
* Get signature header field value.
*/
- (NSString *)signatureHeaderFieldValue;
- (NSMutableURLRequest *)requestWithPath:(NSString *)path
method:(NSString *)method
headers:(NSDictionary *)headers
parameters:(id)parameters;
- (NSMutableURLRequest *)requestWithPath:(NSString *)path
method:(NSString *)method
headers:(NSDictionary *)headers
parameters:(id)parameters
paddingVersion:(BOOL)paddingVersion;
- (void)performRequest:(NSURLRequest *)request
success:(void (^)(NSHTTPURLResponse *response, id responseObject))successBlock
failure:(void (^)(NSHTTPURLResponse *response, id responseObject, NSError *error))failureBlock;
- (void)performRequest:(NSURLRequest *)request
validator:(BOOL (^)(NSHTTPURLResponse *response, id responseObject))validator
success:(void (^)(NSHTTPURLResponse *response, id responseObject))successBlock
failure:(void (^)(NSHTTPURLResponse *response, id responseObject, NSError *error))failureBlock;
- (void)performRequest:(NSURLRequest *)request
success:(void (^)(NSHTTPURLResponse *response, id responseObject))successBlock
failure:(void (^)(NSHTTPURLResponse *response, id responseObject, NSError *error))failureBlock
wait:(BOOL)wait;
- (void)performRequest:(NSURLRequest *)request
validator:(BOOL (^)(NSHTTPURLResponse *response, id responseObject))validator
success:(void (^)(NSHTTPURLResponse *response, id responseObject))successBlock
failure:(void (^)(NSHTTPURLResponse *response, id responseObject, NSError *error))failureBlock
wait:(BOOL)wait;
@end
Swift
class LCPaasClient : NSObject
Undocumented
-
Undocumented
Declaration
Objective-C
@property (nonatomic) LCApplication *application
Swift
var application: LCApplication! { get set }
-
Undocumented
Declaration
Objective-C
@property (nonatomic, readonly, copy) NSString *apiVersion
Swift
var apiVersion: String! { get }
-
Undocumented
Declaration
Objective-C
@property (nonatomic) BOOL currentUserAccessForDefaultACL
Swift
var currentUserAccessForDefaultACL: Bool { get set }
-
Undocumented
Declaration
Objective-C
@property (nonatomic) NSTimeInterval timeoutInterval
Swift
var timeoutInterval: TimeInterval { get set }
-
Undocumented
Declaration
Objective-C
@property (nonatomic) NSMutableDictionary *subclassTable
Swift
var subclassTable: NSMutableDictionary! { get set }
-
Undocumented
Declaration
Objective-C
@property (nonatomic) BOOL productionMode
Swift
var productionMode: Bool { get set }
-
Undocumented
Declaration
Objective-C
@property (nonatomic) BOOL isLastModifyEnabled
Swift
var isLastModifyEnabled: Bool { get set }
-
Undocumented
Declaration
Objective-C
@property (nonatomic) NSLock *lock
Swift
var lock: NSLock! { get set }
-
Undocumented
Declaration
Objective-C
@property (nonatomic) NSMapTable *requestTable
Swift
var requestTable: NSMapTable<AnyObject, AnyObject>! { get set }
-
Undocumented
Declaration
Objective-C
@property (nonatomic) LCURLSessionManager *sessionManager
Swift
var sessionManager: LCURLSessionManager! { get set }
-
Undocumented
Declaration
Objective-C
@property (nonatomic) dispatch_queue_t completionQueue
Swift
var completionQueue: DispatchQueue! { get set }
-
Undocumented
Declaration
Objective-C
@property (nonatomic) NSMutableSet *runningArchivedRequests
Swift
var runningArchivedRequests: NSMutableSet! { get set }
-
Undocumented
Declaration
Objective-C
@property NSMutableDictionary *lastModify
Swift
var lastModify: NSMutableDictionary! { get set }
-
Undocumented
Declaration
Objective-C
+ (LCPaasClient *)sharedInstance;
Swift
class func sharedInstance() -> LCPaasClient!
-
Undocumented
Declaration
Objective-C
-(void)clearLastModifyCache;
Swift
func clearLastModifyCache()
-
Undocumented
-
Undocumented
Declaration
Objective-C
+(NSMutableDictionary *)batchMethod:(NSString *)method path:(NSString *)path body:(NSDictionary *)body parameters:(NSDictionary *)parameters;
Swift
class func batchMethod(_ method: String!, path: String!, body: [AnyHashable : Any]!, parameters: [AnyHashable : Any]!) -> NSMutableDictionary!
-
Undocumented
Declaration
Objective-C
+(void)updateBatchMethod:(NSString *)method path:(NSString *)path dict:(NSMutableDictionary *)dict;
Swift
class func updateBatchMethod(_ method: String!, path: String!, dict: NSMutableDictionary!)
-
Undocumented
Declaration
Objective-C
- (void)getObject:(NSString *)path withParameters:(NSDictionary *)parameters block:(LCIdResultBlock)block;
Swift
func getObject(_ path: String!, withParameters parameters: [AnyHashable : Any]!, block: LCIdResultBlock!)
-
Undocumented
Declaration
Objective-C
- (void)getObject:(NSString *)path paddingVersion:(BOOL)paddingVersion withParameters:(NSDictionary *)parameters block:(LCIdResultBlock)block;
Swift
func getObject(_ path: String!, paddingVersion: Bool, withParameters parameters: [AnyHashable : Any]!, block: LCIdResultBlock!)
-
Undocumented
Declaration
Objective-C
- (void)getObject:(NSString *)path withParameters:(NSDictionary *)parameters block:(LCIdResultBlock)block wait:(BOOL)wait;
Swift
func getObject(_ path: String!, withParameters parameters: [AnyHashable : Any]!, block: LCIdResultBlock!, wait: Bool)
-
Undocumented
Declaration
Objective-C
- (void)getObject:(NSString *)path paddingVersion:(BOOL)paddingVersion withParameters:(NSDictionary *)parameters block:(LCIdResultBlock)block wait:(BOOL)wait;
Swift
func getObject(_ path: String!, paddingVersion: Bool, withParameters parameters: [AnyHashable : Any]!, block: LCIdResultBlock!, wait: Bool)
-
Undocumented
Declaration
Objective-C
- (void)getObject:(NSString *)path withParameters:(NSDictionary *)parameters policy:(LCCachePolicy)policy maxCacheAge:(NSTimeInterval)maxCacheAge block:(LCIdResultBlock)block;
Swift
func getObject(_ path: String!, withParameters parameters: [AnyHashable : Any]!, policy: LCCachePolicy, maxCacheAge: TimeInterval, block: LCIdResultBlock!)
-
Undocumented
Declaration
Objective-C
- (void)putObject:(NSString *)path withParameters:(NSDictionary *)parameters sessionToken:(NSString *)sessionToken block:(LCIdResultBlock)block;
Swift
func putObject(_ path: String!, withParameters parameters: [AnyHashable : Any]!, sessionToken: String!, block: LCIdResultBlock!)
-
Undocumented
Declaration
Objective-C
- (void)postBatchObject:(NSArray *)parameterArray block:(LCArrayResultBlock)block;
Swift
func postBatchObject(_ parameterArray: [Any]!, block: LCArrayResultBlock!)
-
Undocumented
Declaration
Objective-C
- (void)postBatchObject:(NSArray *)parameterArray headerMap:(NSDictionary *)headerMap block:(LCArrayResultBlock)block wait:(BOOL)wait;
Swift
func postBatchObject(_ parameterArray: [Any]!, headerMap: [AnyHashable : Any]!, block: LCArrayResultBlock!, wait: Bool)
-
Undocumented
Declaration
Objective-C
-(void)postBatchSaveObject:(NSArray *)parameterArray headerMap:(NSDictionary *)headerMap eventually:(BOOL)isEventually block:(LCIdResultBlock)block;
Swift
func postBatchSaveObject(_ parameterArray: [Any]!, headerMap: [AnyHashable : Any]!, eventually isEventually: Bool, block: LCIdResultBlock!)
-
Undocumented
Declaration
Objective-C
- (void)postObject:(NSString *)path withParameters:(id)parameters block:(LCIdResultBlock)block;
Swift
func postObject(_ path: String!, withParameters parameters: Any!, block: LCIdResultBlock!)
-
Undocumented
Declaration
Objective-C
- (void)postObject:(NSString *)path withParameters:(id)parameters eventually:(BOOL)isEventually block:(LCIdResultBlock)block;
Swift
func postObject(_ path: String!, withParameters parameters: Any!, eventually isEventually: Bool, block: LCIdResultBlock!)
-
Undocumented
Declaration
Objective-C
-(void)deleteObject:(NSString *)path withParameters:(NSDictionary *)parameters block:(LCIdResultBlock)block;
Swift
func deleteObject(_ path: String!, withParameters parameters: [AnyHashable : Any]!, block: LCIdResultBlock!)
-
Undocumented
Declaration
Objective-C
- (void)deleteObject:(NSString *)path withParameters:(NSDictionary *)parameters eventually:(BOOL)isEventually block:(LCIdResultBlock)block;
Swift
func deleteObject(_ path: String!, withParameters parameters: [AnyHashable : Any]!, eventually isEventually: Bool, block: LCIdResultBlock!)
-
Undocumented
Declaration
Objective-C
- (NSString *)absoluteStringFromPath:(NSString *)path parameters:(NSDictionary *)parameters;
Swift
func absoluteString(fromPath path: String!, parameters: [AnyHashable : Any]!) -> String!
-
Undocumented
Declaration
Objective-C
-(BOOL)addSubclassMapEntry:(NSString *)parseClassName classObject:(Class)object;
Swift
func addSubclassMapEntry(_ parseClassName: String!, classObject object: AnyClass!) -> Bool
-
Undocumented
Declaration
Objective-C
-(Class)classFor:(NSString *)parseClassName;
Swift
func `class`(for parseClassName: String!) -> AnyClass!
-
Undocumented
Declaration
Objective-C
- (void)handleAllArchivedRequests;
Swift
func handleAllArchivedRequests()
-
Undocumented
Declaration
Objective-C
- (NSString *)signatureHeaderFieldValue;
Swift
func signatureHeaderFieldValue() -> String!
-
Undocumented
Declaration
Objective-C
- (NSMutableURLRequest *)requestWithPath:(NSString *)path method:(NSString *)method headers:(NSDictionary *)headers parameters:(id)parameters;
Swift
func request(withPath path: String!, method: String!, headers: [AnyHashable : Any]!, parameters: Any!) -> NSMutableURLRequest!
-
Undocumented
Declaration
Objective-C
- (NSMutableURLRequest *)requestWithPath:(NSString *)path method:(NSString *)method headers:(NSDictionary *)headers parameters:(id)parameters paddingVersion:(BOOL)paddingVersion;
Swift
func request(withPath path: String!, method: String!, headers: [AnyHashable : Any]!, parameters: Any!, paddingVersion: Bool) -> NSMutableURLRequest!
-
Undocumented
Declaration
Objective-C
- (void)performRequest:(NSURLRequest *)request success:(void (^)(NSHTTPURLResponse *response, id responseObject))successBlock failure:(void (^)(NSHTTPURLResponse *response, id responseObject, NSError *error))failureBlock;
Swift
func perform(_ request: URLRequest!, success successBlock: ((HTTPURLResponse?, Any?) -> Void)!, failure failureBlock: ((HTTPURLResponse?, Any?, Error?) -> Void)!)
-
Undocumented
Declaration
Objective-C
- (void)performRequest:(NSURLRequest *)request validator:(BOOL (^)(NSHTTPURLResponse *response, id responseObject))validator success:(void (^)(NSHTTPURLResponse *response, id responseObject))successBlock failure:(void (^)(NSHTTPURLResponse *response, id responseObject, NSError *error))failureBlock;
Swift
func perform(_ request: URLRequest!, validator: ((HTTPURLResponse?, Any?) -> Bool)!, success successBlock: ((HTTPURLResponse?, Any?) -> Void)!, failure failureBlock: ((HTTPURLResponse?, Any?, Error?) -> Void)!)
-
Undocumented
Declaration
Objective-C
- (void)performRequest:(NSURLRequest *)request success:(void (^)(NSHTTPURLResponse *response, id responseObject))successBlock failure:(void (^)(NSHTTPURLResponse *response, id responseObject, NSError *error))failureBlock wait:(BOOL)wait;
Swift
func perform(_ request: URLRequest!, success successBlock: ((HTTPURLResponse?, Any?) -> Void)!, failure failureBlock: ((HTTPURLResponse?, Any?, Error?) -> Void)!, wait: Bool)
-
Undocumented
Declaration
Objective-C
- (void)performRequest:(NSURLRequest *)request validator:(BOOL (^)(NSHTTPURLResponse *response, id responseObject))validator success:(void (^)(NSHTTPURLResponse *response, id responseObject))successBlock failure:(void (^)(NSHTTPURLResponse *response, id responseObject, NSError *error))failureBlock wait:(BOOL)wait;
Swift
func perform(_ request: URLRequest!, validator: ((HTTPURLResponse?, Any?) -> Bool)!, success successBlock: ((HTTPURLResponse?, Any?) -> Void)!, failure failureBlock: ((HTTPURLResponse?, Any?, Error?) -> Void)!, wait: Bool)