From 7cdaa24f3ba637804aca9247ae809c4cc1acc6ed Mon Sep 17 00:00:00 2001 From: lipengwei <lipengwei@nianben.com> Date: Wed, 27 May 2020 09:41:28 +0800 Subject: [PATCH] 3.8.4 --- frameworks/FBSDKCoreKit.framework/Headers/FBSDKGraphRequest.h | 87 ++++++++++++++++++++++++++++++------------- 1 files changed, 61 insertions(+), 26 deletions(-) diff --git a/frameworks/FBSDKCoreKit.framework/Headers/FBSDKGraphRequest.h b/frameworks/FBSDKCoreKit.framework/Headers/FBSDKGraphRequest.h index 2743ec3..802620c 100644 --- a/frameworks/FBSDKCoreKit.framework/Headers/FBSDKGraphRequest.h +++ b/frameworks/FBSDKCoreKit.framework/Headers/FBSDKGraphRequest.h @@ -20,7 +20,21 @@ #import <FBSDKCoreKit/FBSDKGraphRequestConnection.h> +NS_ASSUME_NONNULL_BEGIN + @class FBSDKAccessToken; + +/// typedef for FBSDKHTTPMethod +typedef NSString *const FBSDKHTTPMethod NS_TYPED_EXTENSIBLE_ENUM NS_SWIFT_NAME(HTTPMethod); + +/// GET Request +FOUNDATION_EXPORT FBSDKHTTPMethod FBSDKHTTPMethodGET NS_SWIFT_NAME(get); + +/// POST Request +FOUNDATION_EXPORT FBSDKHTTPMethod FBSDKHTTPMethodPOST NS_SWIFT_NAME(post); + +/// DELETE Request +FOUNDATION_EXPORT FBSDKHTTPMethod FBSDKHTTPMethodDELETE NS_SWIFT_NAME(delete); /** Represents a request to the Facebook Graph API. @@ -39,52 +53,70 @@ By default, FBSDKGraphRequest will attempt to recover any errors returned from Facebook. You can disable this via `disableErrorRecovery:`. -- See:FBSDKGraphErrorRecoveryProcessor + @see FBSDKGraphErrorRecoveryProcessor */ +NS_SWIFT_NAME(GraphRequest) @interface FBSDKGraphRequest : NSObject +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + /** - Initializes a new instance that use use `[FBSDKAccessToken currentAccessToken]`. - - Parameter graphPath: the graph path (e.g., @"me"). - - Parameter parameters: the optional parameters dictionary. + Initializes a new instance that use use `[FBSDKAccessToken currentAccessToken]`. + @param graphPath the graph path (e.g., @"me"). + */ +- (instancetype)initWithGraphPath:(NSString *)graphPath; + +/** + Initializes a new instance that use use `[FBSDKAccessToken currentAccessToken]`. + @param graphPath the graph path (e.g., @"me"). + @param method the HTTP method. Empty String defaults to @"GET". */ - (instancetype)initWithGraphPath:(NSString *)graphPath - parameters:(NSDictionary *)parameters; + HTTPMethod:(FBSDKHTTPMethod)method; /** Initializes a new instance that use use `[FBSDKAccessToken currentAccessToken]`. - - Parameter graphPath: the graph path (e.g., @"me"). - - Parameter parameters: the optional parameters dictionary. - - Parameter HTTPMethod: the optional HTTP method. nil defaults to @"GET". + @param graphPath the graph path (e.g., @"me"). + @param parameters the optional parameters dictionary. */ - (instancetype)initWithGraphPath:(NSString *)graphPath - parameters:(NSDictionary *)parameters - HTTPMethod:(NSString *)HTTPMethod; + parameters:(NSDictionary<NSString *, id> *)parameters; + +/** + Initializes a new instance that use use `[FBSDKAccessToken currentAccessToken]`. + @param graphPath the graph path (e.g., @"me"). + @param parameters the optional parameters dictionary. + @param method the HTTP method. Empty String defaults to @"GET". + */ +- (instancetype)initWithGraphPath:(NSString *)graphPath + parameters:(NSDictionary<NSString *, id> *)parameters + HTTPMethod:(FBSDKHTTPMethod)method; /** Initializes a new instance. - - Parameter graphPath: the graph path (e.g., @"me"). - - Parameter parameters: the optional parameters dictionary. - - Parameter tokenString: the token string to use. Specifying nil will cause no token to be used. - - Parameter version: the optional Graph API version (e.g., @"v2.0"). nil defaults to `[FBSDKSettings graphAPIVersion]`. - - Parameter HTTPMethod: the optional HTTP method (e.g., @"POST"). nil defaults to @"GET". + @param graphPath the graph path (e.g., @"me"). + @param parameters the optional parameters dictionary. + @param tokenString the token string to use. Specifying nil will cause no token to be used. + @param version the optional Graph API version (e.g., @"v2.0"). nil defaults to `[FBSDKSettings graphAPIVersion]`. + @param method the HTTP method. Empty String defaults to @"GET". */ - (instancetype)initWithGraphPath:(NSString *)graphPath - parameters:(NSDictionary *)parameters - tokenString:(NSString *)tokenString - version:(NSString *)version - HTTPMethod:(NSString *)HTTPMethod + parameters:(NSDictionary<NSString *, id> *)parameters + tokenString:(nullable NSString *)tokenString + version:(nullable NSString *)version + HTTPMethod:(FBSDKHTTPMethod)method NS_DESIGNATED_INITIALIZER; /** The request parameters. */ -@property (nonatomic, strong, readonly) NSMutableDictionary *parameters; +@property (nonatomic, copy) NSDictionary<NSString *, id> *parameters; /** The access token string used by the request. */ -@property (nonatomic, copy, readonly) NSString *tokenString; +@property (nonatomic, copy, readonly, nullable) NSString *tokenString; /** The Graph API endpoint to use for the request, for example "me". @@ -94,7 +126,7 @@ /** The HTTPMethod to use for the request, for example "GET" or "POST". */ -@property (nonatomic, copy, readonly) NSString *HTTPMethod; +@property (nonatomic, copy, readonly) FBSDKHTTPMethod HTTPMethod; /** The Graph API version to use (e.g., "v2.0") @@ -103,7 +135,7 @@ /** If set, disables the automatic error recovery mechanism. - - Parameter disable: whether to disable the automatic error recovery mechanism + @param disable whether to disable the automatic error recovery mechanism By default, non-batched FBSDKGraphRequest instances will automatically try to recover from errors by constructing a `FBSDKGraphErrorRecoveryProcessor` instance that @@ -112,12 +144,15 @@ This will override [FBSDKSettings setGraphErrorRecoveryDisabled:]. */ -- (void)setGraphErrorRecoveryDisabled:(BOOL)disable; +- (void)setGraphErrorRecoveryDisabled:(BOOL)disable +NS_SWIFT_NAME(setGraphErrorRecovery(disabled:)); /** Starts a connection to the Graph API. - - Parameter handler: The handler block to call when the request completes. + @param handler The handler block to call when the request completes. */ -- (FBSDKGraphRequestConnection *)startWithCompletionHandler:(FBSDKGraphRequestHandler)handler; +- (FBSDKGraphRequestConnection *)startWithCompletionHandler:(nullable FBSDKGraphRequestBlock)handler; @end + +NS_ASSUME_NONNULL_END -- Gitblit v1.8.0