LCRouter Class Reference

Inherits from NSObject
Declared in LCRouter.h

+ sharedInstance

+ (instancetype)sharedInstance

– cachedAppRouterServerTable

Get cached App-Router server table

- (NSDictionary *_Nullable)cachedAppRouterServerTable

Discussion

Get cached App-Router server table

Declared In

LCRouter.h

– cachedRTMServerTable

Get cached RTM server table.

- (NSDictionary *_Nullable)cachedRTMServerTable

Discussion

Get cached RTM server table.

Declared In

LCRouter.h

– fetchRTMServerTableInBackground:

Fetch RTM server table asynchronously.

- (void)fetchRTMServerTableInBackground:(void ( ^ _Nullable ) ( NSDictionary *RTMServerTable , NSError *error ))block

Parameters

block

The callback of fetching result.

Discussion

Fetch RTM server table asynchronously.

If fetching did succeed, it will cache the RTM server table for later use.

Declared In

LCRouter.h

– URLStringForPath:

Get URL string for storage server.

- (NSString *)URLStringForPath:(NSString *)path

Parameters

path

The API endpoint.

Discussion

Get URL string for storage server.

Declared In

LCRouter.h

– batchPathForPath:

Add a version prefix to the path. For example, if the path given by you is “book”, this method will return “/1.1/book”.

- (NSString *)batchPathForPath:(NSString *)path

Parameters

path

The API endpoint.

Discussion

Get batch path for the given path.

Declared In

LCRouter.h

– presetURLString:forServiceModule:

Preset URL string for a service module.

- (void)presetURLString:(NSString *)URLString forServiceModule:(NSString *)serviceModule

Parameters

URLString

The URL string of service module.

serviceModule

The service module which you want to preset.

Discussion

Preset URL string for a service module.

The preset URL has the highest priority, it will override app router’s result.

Declared In

LCRouter.h

– updateInBackground

Update router asynchronously.

- (void)updateInBackground

Discussion

Update router asynchronously.

Declared In

LCRouter.h

– cleanRouterCacheForKey:

Clean router cache.

- (void)cleanRouterCacheForKey:(NSString *)key

Parameters

key

Key for cache.

Discussion

Clean router cache.

Declared In

LCRouter.h