TapLogin-Unity/Plugins/iOS/TapLoginSDK.framework/Headers/TTSDKProfile.h

47 lines
1.1 KiB
Objective-C
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

//
// TTSDKProfile.h
// TapTapSDK
//
// Created by TapTap on 2017/10/27.
// Copyright © 2017年 易玩. All rights reserved.
//
#import <Foundation/Foundation.h>
/**
* @brief TapTap用户信息封装类
*
* 该类封装了所有用户信息提供的返回数据
*/
@interface TTSDKProfile : NSObject
/// 用户名
@property (nonatomic, readonly, strong) NSString *name;
/// 用户头像
@property (nonatomic, readonly, strong) NSString *avatar;
/// open id
@property (nonatomic, readonly, strong) NSString *openid;
/// union id
@property (nonatomic, readonly, strong) NSString *unionid;
@property (nonatomic, readonly, strong) NSString *email;
@property (nonatomic, readonly, assign, getter = isEmailVerified) BOOL emailVerified;
- (instancetype)initWithJSON:(NSDictionary *)json;
/**
* @brief 获取当前用户信息
*
* 该用户信息会优先读取本地缓存不存在时将会返回nil
*/
+ (TTSDKProfile *)currentProfile;
+ (void)fetchProfileForCurrentAccessToken:(void (^)(TTSDKProfile *profile, NSError *error))handler;
- (NSString *)toJsonString;
@end