//
//  HWOcrClientToken.h
//  OCR
//
//  Created by huawei on 2018/10/31.
//  Copyright © 2018/10/31 huawei. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

@interface HWOcrClientToken : NSObject

/**
 HWOcrClientToken 初始化方法

 @param domainName domainName
 @param userName 用户名
 @param password 密码
 @param region region
 @param endPoint endPoint
 @return HWOcrClientToken 实例
 */
- (instancetype)initWithDomainName:(NSString *)domainName
                          userName:(NSString *)userName
                          password:(NSString *)password
                            region:(NSString *)region
                          endPoint:(NSString *)endPoint;

/**
 ocr 图片识别的请求方法

 @param uri uri地址
 @param image 需要识别的图片
 @param options 请求需要添加的参数
 @param successHandler 请求成功的回调
 @param failHandler 请求失败的回调
 */
- (void)requestOcrServiceWithUri:(NSString *)uri
                           image: (UIImage *)image
                         options: (NSDictionary *)options
                  successHandler: (void (^)(id result))successHandler
                     failHandler: (void (^)(NSError* error, NSInteger errCode))failHandler;
@end
