Skip to content

Commit bd6fc29

Browse files
committed
[fix] fix README error
1 parent ded2701 commit bd6fc29

2 files changed

Lines changed: 20 additions & 20 deletions

File tree

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ When you have a large number of network request apis in the same file `RaAPIWrap
1414

1515
## Say it before
1616

17-
**Special Note! **: `RaAPIWrapper` is just a syntactic sugar for **defining** web requests. You need to use `Alamofire`, `Moya`, other third-party web framework or call `URLSession` directly to initiate web requests on this basis.
17+
**Special Note!** : `RaAPIWrapper` is just a syntactic sugar for **defining** web requests. You need to use `Alamofire`, `Moya`, other third-party web framework or call `URLSession` directly to initiate web requests on this basis.
1818

1919
The good thing is that you can easily integrate `RaAPIWrapper` into your existing project with few or no code changes, and `RaAPIWrapper` can coexist very well with the existing web framework in your project.
2020

@@ -27,21 +27,21 @@ The good thing is that you can easily integrate `RaAPIWrapper` into your existin
2727
## Example
2828

2929
```swift
30-
@GET(/api/v1/no_param)
30+
@GET("/api/v1/no_param")
3131
static var noParamAPI: APIParameterBuilder<()>? = nil
3232

33-
@POST(/api/v1/tuple_param)
33+
@POST("/api/v1/tuple_param")
3434
static var tupleParamAPI: APIParameterBuilder<(id: Int, name: String?)>? = {
35-
// Eliminate the warning by explicitly converting to `[String: Any?]`.
36-
// Also ensure that `nil` parameters can be filtered.
37-
["id": $0.id, "name": $0.name] as [String: Any?]
35+
// Eliminate the warning by explicitly converting to `[String: Any?]`.
36+
// Also ensure that `nil` parameters can be filtered.
37+
["id": $0.id, "name": $0.name] as [String: Any?]
3838
}
3939

4040
@POST("/post")
4141
static var postWithModel: APIParameterBuilder<Arg>? = {
42-
// You can have your model follow the `APIParameterConvertible` protocol,
42+
// You can have your model follow the `APIParameterConvertible` protocol,
4343
// or use `AnyAPIHashableParameter` to wrap your model in an outer layer.
44-
AnyAPIHashableParameter($0)
44+
AnyAPIHashableParameter($0)
4545
}
4646
```
4747

@@ -66,8 +66,8 @@ Or add the following to your `Package.swift` file:
6666
```swift
6767
dependencies: [
6868
.package(
69-
url: "https://github.com/rakuyoMo/RaAPIWrapper.git",
70-
.upToNextMajor(from: "1.0.0")
69+
url: "https://github.com/rakuyoMo/RaAPIWrapper.git",
70+
.upToNextMajor(from: "1.0.0")
7171
)
7272
]
7373
```
@@ -80,4 +80,4 @@ Please refer to the example in `Demo.playground`.
8080
8181
## License
8282

83-
`RaAPIWrapper` is available under the **MIT** license. For more information, see [LICENSE](LICENSE).
83+
`RaAPIWrapper` is available under the **MIT** license. For more information, see [LICENSE](LICENSE).

README_CN.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,19 @@
2525
## 示例
2626

2727
```swift
28-
@GET(/api/v1/no_param)
28+
@GET("/api/v1/no_param")
2929
static var noParamAPI: APIParameterBuilder<()>? = nil
3030

31-
@POST(/api/v1/tuple_param)
31+
@POST("/api/v1/tuple_param")
3232
static var tupleParamAPI: APIParameterBuilder<(id: Int, name: String?)>? = {
33-
// 通过显式转换为 `[String: Any?]` 来消除警告,同时确保为 `nil` 的参数能够被过滤。
34-
["id": $0.id, "name": $0.name] as [String: Any?]
33+
// 通过显式转换为 `[String: Any?]` 来消除警告,同时确保为 `nil` 的参数能够被过滤。
34+
["id": $0.id, "name": $0.name] as [String: Any?]
3535
}
3636

3737
@POST("/post")
3838
static var postWithModel: APIParameterBuilder<Arg>? = {
39-
// 您可以让您的模型遵循 `APIParameterConvertible` 协议,或者使用 `AnyAPIHashableParameter` 在外面包裹一层。
40-
AnyAPIHashableParameter($0)
39+
// 您可以让您的模型遵循 `APIParameterConvertible` 协议,或者使用 `AnyAPIHashableParameter` 在外面包裹一层。
40+
AnyAPIHashableParameter($0)
4141
}
4242
```
4343

@@ -62,8 +62,8 @@ pod 'RaAPIWrapper'
6262
```swift
6363
dependencies: [
6464
.package(
65-
url: "https://github.com/rakuyoMo/RaAPIWrapper.git",
66-
.upToNextMajor(from: "1.0.0")
65+
url: "https://github.com/rakuyoMo/RaAPIWrapper.git",
66+
.upToNextMajor(from: "1.0.0")
6767
)
6868
]
6969
```
@@ -76,4 +76,4 @@ dependencies: [
7676
7777
## License
7878

79-
`RaAPIWrapper`**MIT** 许可下可用。 有关更多信息,请参见 [LICENSE](LICENSE) 文件。
79+
`RaAPIWrapper`**MIT** 许可下可用。 有关更多信息,请参见 [LICENSE](LICENSE) 文件。

0 commit comments

Comments
 (0)