//
//  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 init method

 @param domainName domainName
 @param userName user name
 @param password password
 @param region region
 @return HWOcrClientToken instancetype
 */
- (instancetype)initWithDomainName:(NSString *)domainName
                          userName:(NSString *)userName
                          password:(NSString *)password
                            region:(NSString *)region;

/**
 the request of ocr recognise

 @param uri uri address
 @param image the image which will recognise
 @param options request param
 @param successHandler success call back
 @param failHandler failure call back
 */
- (void)requestOcrServiceWithUri:(NSString *)uri
                           image: (UIImage *)image
                         options: (NSDictionary *)options
                  successHandler: (void (^)(id result))successHandler
                     failHandler: (void (^)(NSError* error, NSInteger errCode))failHandler;
@end
