123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- //
- // XSNetwork.h
- // XenonSDK
- //
- // Created by SAGESSE on 2019/5/28.
- // Copyright © 2019 SAGESSE. All rights reserved.
- //
- #import <Foundation/Foundation.h>
- @interface XSNetwork : NSObject
- @property (nonatomic, class) NSString* baseURL;
- + (void)showPrompt:(NSString*)message;
-
- + (void)showHudLoading;
- + (void)showHudSuccess:(id)error;
- + (void)showHudFailure:(id)error;
- + (void)hideHud;
- /// Make a error.
- + (NSError*)errorWithCode:(NSInteger)code message:(NSString*)message;
- + (NSDictionary*)bodyWithParameters:(id)parameters;
- /// Request systme configure.
- + (void)configureWithIdentifier:(NSString*)identifier flags:(NSString*)falgs complete:(void(^)(id object, NSError* error))complete;
- /// Send SMS security code.
- + (void)sendSMSWithPhone:(NSString*)phone type:(NSInteger)type complete:(void(^)(id object, NSError* error))complete;
- /// Auth login.
- + (void)authWithUser:(NSString*)uid complete:(void(^)(id object, NSError* error))complete ;
- /// Check user with phone
- + (void)checkWithPhone:(NSString*)phone complete:(void(^)(id object, NSError* error))complete;
- /// Bind user with phone.
- + (void)bindWithPhone:(NSString*)phone code:(NSString*)code username:(NSString*)username complete:(void(^)(id object, NSError* error))complete;
- /// Reset password.
- + (void)resetWithPhone:(NSString*)phone code:(NSString*)code password:(NSString*)password complete:(void(^)(id object, NSError* error))complete;
- /// Fast login a user.
- + (void)loginWithComplete:(void(^)(id object, NSError* error))complete;
- /// Phone & Security Code login a user.
- + (void)loginWithPhone:(NSString*)phone code:(NSString*)code complete:(void(^)(id object, NSError* error))complete;
- /// Facebook login a user.
- + (void)loginFacebookWithToken:(NSString*)token appId:(NSString*)appid playerId:(NSString *)playerid complete:(void(^)(id object, NSError* error))complete;
- //Facebook bind a user
- +(void)bindFacebookWithToken:(NSString *)token appId:(NSString *)appid playerId:(NSString *)playerid complete:(void (^)(id, NSError *))complete;
- /// Apple login a user.
- + (void)loginApplekWithToken:(NSString*)token complete:(void(^)(id object, NSError* error))complete;
- /// Account & Password login a user.
- + (void)loginWithAccount:(NSString*)account password:(NSString*)password complete:(void(^)(id object, NSError* error))complete;
- /// Account & Password login a user.
- + (void)registerWithAccount:(NSString*)account password:(NSString*)password complete:(void(^)(id object, NSError* error))complete;
- /// Auto trigger;
- + (void)trigger:(NSInteger)count;
- ///广告记录
- +(void)adRecord:(NSString *)action spaceId:(NSString *)spaceId agentName:(NSString *)agentName medium:(NSString *)medium adUnitId:(NSString *)adUnitId type:(NSString *)type unitAdId:(NSString *)unitAdId errorMsg:(NSString *)errorMeg;
- /// Trace log.
- + (void)log:(NSInteger)code session:(NSString*)session extra:(NSString*)extra;
- + (void)reportWithUser:(NSString*)uid Name:(NSString*)name level:(NSInteger)level server:(NSString*)server;
- /// Get pay route.
- + (void)routeWithComplete:(void(^)(id object, NSError* error))complete;
- #if SDK_HAS_IAP_PAYMENT
- /// Pay a product.
- + (void)payWithParameters:(id)parameters complete:(void(^)(id object, NSError* error))complete;
- /// Pay a product with receipt.
- + (void)payWithReceipt:(id)receipt orderId:(id)orderId complete:(void(^)(id object, NSError* error))complete;
- #endif
- @end
|