Skip to content

Commit dd6e376

Browse files
committed
Merge branch 'develop'
2 parents 381904a + 59e5704 commit dd6e376

File tree

16 files changed

+71
-64
lines changed

16 files changed

+71
-64
lines changed

Example/iOS-Swift/Scenes/Base.lproj/Main.storyboard

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@
137137
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="FPp-Vf-YK5" userLabel="Response Area">
138138
<rect key="frame" x="180" y="0.0" width="325" height="623"/>
139139
<subviews>
140-
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" text="Resopnse" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="VNd-yL-ZI4">
140+
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" text="Response" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="VNd-yL-ZI4">
141141
<rect key="frame" x="8" y="8" width="309" height="607"/>
142142
<color key="textColor" systemColor="labelColor" cocoaTouchSystemColor="darkTextColor"/>
143143
<fontDescription key="fontDescription" type="system" pointSize="14"/>

Example/iOS-Swift/Scenes/zh-Hans.lproj/Main.strings

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
/* Class = "UIButton"; normalTitle = "Start"; ObjectID = "TWh-Mz-u8r"; */
1818
"TWh-Mz-u8r.normalTitle" = "开始";
1919

20-
/* Class = "UITextView"; text = "Resopnse"; ObjectID = "VNd-yL-ZI4"; */
20+
/* Class = "UITextView"; text = "Response"; ObjectID = "VNd-yL-ZI4"; */
2121
"VNd-yL-ZI4.text" = "请求响应";
2222

2323
/* Class = "UILabel"; text = "Title"; ObjectID = "XT4-OY-1f4"; */

Example/iOS-Swift/en.lproj/Localizable.strings

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"HUDState.Loadding" = "Loadding...";
88
"HUDState.Uploading" = "Uploading...";
99

10-
/// - RFAPI Build-in
10+
/// - RFAPI Built-in
1111

1212
"RFAPI.Error.GeneralFailureReasonApp" = "It seems to be an application bug";
1313
"RFAPI.Error.GeneralFailureReasonServer" = "It may be the server being upgraded or maintained, or it may be an application bug";

Example/iOS-Swift/zh-Hans.lproj/Localizable.strings

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"HUDState.Loadding" = "载入中...";
88
"HUDState.Uploading" = "上传中...";
99

10-
/// - RFAPI Build-in
10+
/// - RFAPI Built-in
1111

1212
"RFAPI.Error.GeneralFailureReasonApp" = "很可能是应用 bug";
1313
"RFAPI.Error.GeneralFailureReasonServer" = "可能服务器正在升级或者维护,也可能是应用 bug";

Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ source 'https://github.com/PBPods/PBFlex.git'
33
source 'https://cdn.cocoapods.org/'
44

55
target 'Example-iOS' do
6-
platform :ios, '8.0'
6+
platform :ios, '9.0'
77

88
pod 'RFMessageManager', :subspecs => ['SVProgressHUD']
99
pod 'RFAPI', :path => '.'

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Only integration through CocoaPods is supported due to dependent factors. There
4444
pod 'RFAPI'
4545
```
4646

47-
Specify develop branch to install the lastest version:
47+
Specify develop branch to install the latest version:
4848

4949
```ruby
5050
pod 'RFAPI',
@@ -59,7 +59,7 @@ Unlike most network libraries, you cannot make a request with a url object. Inst
5959
```swift
6060
let define = RFAPIDefine()
6161
define.name = RFAPIName(rawValue: "TopicListRecommended")
62-
define.path = "https://exapmle.com/api/v2/topics/recommended"
62+
define.path = "https://example.com/api/v2/topics/recommended"
6363
define.method = "GET"
6464
define.needsAuthorization = true
6565
define.responseExpectType = .objects
@@ -71,7 +71,7 @@ Generally, a default define should be created. After that, you only need to prov
7171
```swift
7272
let api = ... // RFAPI instance
7373
let defaultDefine = RFAPIDefine()
74-
defaultDefine.baseURL = URL(string: "https://exapmle.com/")
74+
defaultDefine.baseURL = URL(string: "https://example.com/")
7575
defaultDefine.pathPrefix = "api/v2/"
7676
defaultDefine.method = "GET"
7777
defaultDefine.needsAuthorization = true
@@ -93,7 +93,7 @@ The more recommended way is to load the defines from the configuration file. You
9393
```json
9494
{
9595
"DEFAULT": {
96-
"Base": "https://exapmle.com/",
96+
"Base": "https://example.com/",
9797
"Path Prefix": "api/v2/",
9898
"Method": "GET",
9999
"Authorization": true
@@ -128,7 +128,7 @@ By default, the content format of request and response are both JSON. You can mo
128128
{
129129
"FormUpload": {
130130
"Method": "POST",
131-
"Path": "commom/formupload",
131+
"Path": "common/formupload",
132132
"Serializer": "AFHTTPRequestSerializer",
133133
"Response Serializer": "AFPropertyListResponseSerializer",
134134
"Response Type": 1
@@ -162,7 +162,7 @@ For more usage, checkout [Cookbook](Documents/Cookbook.md)
162162

163163
When a request is cancelled, the failure callback will not be called. Also a failure callback will never be called with an `NSURLErrorCancelled` error parameter.
164164

165-
But you could get an `NSURLErrorCancelled` error from a RFAPITask object in the finished or complation callback.
165+
But you could get an `NSURLErrorCancelled` error from a RFAPITask object in the finished or completion callback.
166166

167167
* Most parameters are mutable
168168

README.zh-hans.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ pod 'RFAPI',
6161
```swift
6262
let define = RFAPIDefine()
6363
define.name = RFAPIName(rawValue: "TopicListRecommended")
64-
define.path = "https://exapmle.com/api/v2/topics/recommended"
64+
define.path = "https://example.com/api/v2/topics/recommended"
6565
define.method = "GET"
6666
define.needsAuthorization = true
6767
define.responseExpectType = .objects
@@ -73,7 +73,7 @@ define.responseClass = "TopicEntity"
7373
```swift
7474
let api = ... // RFAPI 实例
7575
let defaultDefine = RFAPIDefine()
76-
defaultDefine.baseURL = URL(string: "https://exapmle.com/")
76+
defaultDefine.baseURL = URL(string: "https://example.com/")
7777
defaultDefine.pathPrefix = "api/v2/"
7878
defaultDefine.method = "GET"
7979
defaultDefine.needsAuthorization = true
@@ -95,7 +95,7 @@ define.responseClass = "TopicEntity"
9595
```json
9696
{
9797
"DEFAULT": {
98-
"Base": "https://exapmle.com/",
98+
"Base": "https://example.com/",
9999
"Path Prefix": "api/v2/",
100100
"Method": "GET",
101101
"Authorization": true
@@ -130,7 +130,7 @@ defineManager.setDefinesWithRulesInfo(rules)
130130
{
131131
"FormUpload": {
132132
"Method": "POST",
133-
"Path": "commom/formupload",
133+
"Path": "common/formupload",
134134
"Serializer": "AFHTTPRequestSerializer",
135135
"Response Serializer": "AFPropertyListResponseSerializer",
136136
"Response Type": 1

RFAPI.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'RFAPI'
3-
s.version = '2.1.0'
3+
s.version = '2.1.1'
44
s.summary = 'RFAPI is a network request library specially designed for API requests. It is a URL session wrapper base on AFNetworking.'
55

66
s.homepage = 'https://github.com/RFUI/RFAPI'

Sources/RFAPI/Define/RFAPIDefine.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ typedef NSString * RFAPIName NS_EXTENSIBLE_STRING_ENUM;
1919
NSCopying,
2020
NSSecureCoding
2121
>
22-
/// Used to get a deine from a RFAPIDefineManager
22+
/// Used to get a define from a RFAPIDefineManager
2323
@property (copy, nullable) RFAPIName name;
2424

2525
/**

Sources/RFAPI/RFAPI.h

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ typedef void(^RFAPIRequestCombinedCompletionCallback)(id<RFAPITask> __nullable t
200200

201201
/// Send array parameters
202202
FOUNDATION_EXTERN NSString *__nonnull const RFAPIRequestArrayParameterKey;
203-
/// Sent parameters throgh qury string
203+
/// Sent parameters through qury string
204204
FOUNDATION_EXTERN NSString *__nonnull const RFAPIRequestForceQuryStringParametersKey;
205205

206206
/// Errors generated inside RFAPI
@@ -217,7 +217,7 @@ FOUNDATION_EXTERN NSErrorDomain __nonnull const RFAPIErrorDomain;
217217
The parameters to be encoded.
218218
219219
If you want to send an array parameters, set `RFAPIRequestArrayParameterKey` key with the array.
220-
If you want some parameters sent throgh qury string of the URL, set `RFAPIRequestForceQuryStringParametersKey` with a dictionary contains these parameters.
220+
If you want some parameters sent through qury string of the URL, set `RFAPIRequestForceQuryStringParametersKey` with a dictionary contains these parameters.
221221
*/
222222
@property (nullable) NSDictionary<NSString *, id> *parameters;
223223

@@ -239,7 +239,7 @@ FOUNDATION_EXTERN NSErrorDomain __nonnull const RFAPIErrorDomain;
239239
/// Group identifier for request.
240240
@property (nullable) NSString *groupIdentifier;
241241

242-
/// An activity message to be displayed durning the request executing.
242+
/// An activity message to be displayed during the request executing.
243243
/// If the request is finished right after been make, eg. it has been already cached, the message will not be displayed.
244244
@property (nullable) RFNetworkActivityMessage *activityMessage;
245245

@@ -271,12 +271,14 @@ FOUNDATION_EXTERN NSErrorDomain __nonnull const RFAPIErrorDomain;
271271
/// It will not be called if the request is cancelled.
272272
@property (nullable) RFAPIRequestFailureCallback failure NS_SWIFT_NAME(failureCallback);
273273

274-
/// A block object to be executed when the request is complated.
274+
/// A block object to be executed when the request is completed.
275275
@property (nullable) RFAPIRequestFinishedCallback finished NS_SWIFT_NAME(finishedCallback);
276276

277-
/// A block object to be executed when the request is complated.
277+
/// A block object to be executed when the request is completed.
278278
/// Error will be nil if the request is cancelled. At this time, you could get the error object on the task object.
279-
@property (nullable) RFAPIRequestCombinedCompletionCallback combinedComplation NS_SWIFT_NAME(complationCallback);
279+
@property (nullable) RFAPIRequestCombinedCompletionCallback combinedCompletion NS_SWIFT_NAME(completionCallback);
280+
281+
@property (nullable) RFAPIRequestCombinedCompletionCallback combinedComplation API_DEPRECATED_WITH_REPLACEMENT("combinedCompletion", macos(10.10, 10.10), ios(8.0, 8.0), tvos(9.0, 9.0)) NS_SWIFT_NAME(complationCallback);
280282

281283
/// For debugging purposes, delaying the sending of network requests.
282284
/// This may be used to test whether the UI is in a proper state when network latency.
@@ -298,10 +300,12 @@ FOUNDATION_EXTERN NSErrorDomain __nonnull const RFAPIErrorDomain;
298300
/// Set callback to be executed when the request finishes unsuccessfully.
299301
- (void)setFailureCallback:(nullable void (^)(id<RFAPITask> __nullable task, NSError *__nonnull error))failure NS_SWIFT_NAME(failure(_:));
300302

301-
/// Set callback to be executed when the request is complated.
303+
/// Set callback to be executed when the request is completed.
302304
- (void)setFinishedCallback:(nullable void (^)(id<RFAPITask> __nullable task, BOOL success))finished NS_SWIFT_NAME(finished(_:));
303305

304-
/// Set callback to be executed when the request is complated.
305-
- (void)setComplationCallback:(nullable void (^)(id<RFAPITask> __nullable task, id __nullable responseObject, NSError *__nullable error))complation NS_SWIFT_NAME(complation(_:));
306+
/// Set callback to be executed when the request is completed.
307+
- (void)setCompletionCallback:(nullable void (^)(id<RFAPITask> __nullable task, id __nullable responseObject, NSError *__nullable error))completion NS_SWIFT_NAME(completion(_:));
308+
309+
- (void)setComplationCallback:(nullable void (^)(id<RFAPITask> __nullable task, id __nullable responseObject, NSError *__nullable error))complation API_DEPRECATED_WITH_REPLACEMENT("-setCompletionCallback:", macos(10.10, 10.10), ios(8.0, 8.0), tvos(9.0, 9.0)) NS_SWIFT_NAME(complation(_:));
306310

307311
@end

0 commit comments

Comments
 (0)