You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

68 lines
0 B

2 years ago
//
// MOBFOAuthService.h
// MOBFoundation
//
// Created by fenghj on 15/6/9.
// Copyright (c) 2015年 MOB. All rights reserved.
//
#import <MOBFoundation/MOBFoundation.h>
/**
* OAuth服务
*/
@interface MOBFOAuthService : MOBFHttpService
/**
*
*
* @param consumerSecret nil
* @param oauthTokenSecret nil
*/
- (void)setSecretByConsumerSecret:(NSString *)consumerSecret
oauthTokenSecret:(NSString *)oauthTokenSecret;
/**
* OAuth参数
*
* @param value
* @param key
*/
- (void)addOAuthParameter:(id)value forKey:(NSString *)key;
/**
* OAuth参数
*
* @param oauthParameters OAuth参数集合
*/
- (void)addOAuthParameters:(NSDictionary *)oauthParameters;
/**
* HTTP请求
*
* @param urlString
* @param method
* @param parameters
* @param headers
* @param oauthParameters OAuth请求参数
* @param consumerSecret
* @param oauthSecret OAuth令牌密钥
* @param resultHandler
* @param faultHandler
* @param uploadProgressHandler
*
* @return HTTP服务对象
*/
+ (MOBFOAuthService *)sendRequestByURLString:(NSString *)urlString
method:(NSString *)method
parameters:(NSDictionary *)parameters
headers:(NSDictionary *)headers
oauthParameters:(NSDictionary *)oauthParameters
consumerSecret:(NSString *)consumerSecret
oauthTokenSecret:(NSString *)oauthTokenSecret
onResult:(MOBFHttpResultEvent)resultHandler
onFault:(MOBFHttpFaultEvent)faultHandler
onUploadProgress:(MOBFHttpUploadProgressEvent)uploadProgressHandler;
@end