Before using this class you must authorize or register with the help of VPNUAuthorizer class. You must pass the same VPNUTransport instance to its constructor as you have passed to VPNUAuthorizer instance constructor.
Extends: NSObject
Declared in: VPNUAccount.h
+ (instancetype)accountWithTransport:(VPNUTransport *)transport;
An initialized account object or nil if the object couldn't be created.
This method is a convenience constructor.
- (NSArray<VPNUAccountDevice *> *)devicesWithError:(NSError **)error;
An array of VPNUAccountDevice objects for currently logged-in user.
It blocks a calling thread. This method shouldn't be called from main thread.
- (instancetype)initWithTransport:(VPNUTransport *)transport NS_DESIGNATED_INITIALIZER;
An initialized account object or nil if the object couldn't be created.
- (NSArray<VPNUAccountDeviceStatistics *> *) statisticsForDevice:(VPNUAccountDevice *)device withError:(NSError **)error;
An array of VPNUAccountDeviceStatistics objects for currently logged-in user. Each object represents statistics for a specific date.
It blocks a calling thread. This method shouldn't be called from main thread.
- (VPNUAccountStatus *)statusWithError:(NSError **)error;
Currently logged-in user's account status.
It blocks a calling thread. This method shouldn't be called from main thread.
- (VPNUAccountStatus *)statusWithSquareFlag:(BOOL)squareFlag andError:(NSError **)error;
Currently logged-in user's account status.
It blocks a calling thread. This method shouldn't be called from main thread.
- (VPNUAccountDevice *)userDeviceInfoWithError:(NSError **)error;
Currently logged-in user's device information.
It blocks a calling thread. This method shouldn't be called from main thread.
- (VPNUAccountUserInfo *)userInfoWithError:(NSError **)error;
Currently logged-in user's account information.
It blocks a calling thread. This method shouldn't be called from main thread.