Skip to content

Commit f55b7a7

Browse files
committed
Support API RecognizeGeneralStructure.
1 parent faeb93d commit f55b7a7

File tree

7 files changed

+397
-8
lines changed

7 files changed

+397
-8
lines changed

AlibabacloudOcrApi20210707.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Pod::Spec.new do |spec|
22

33
spec.name = "AlibabacloudOcrApi20210707"
4-
spec.version = "3.0.0"
4+
spec.version = "3.1.0"
55
spec.license = "Apache 2.0"
66
spec.summary = "Alibaba Cloud ocr-api (20210707) SDK Library for Swift"
77
spec.homepage = "https://github.com/alibabacloud-sdk-swift/ocr-api-20210707"
@@ -19,7 +19,7 @@ Pod::Spec.new do |spec|
1919

2020
spec.dependency 'Tea', '~> 1.0.0'
2121
spec.dependency 'TeaUtils', '~> 1.0.5'
22-
spec.dependency 'AlibabacloudOpenApi', '~> 1.0.4'
22+
spec.dependency 'AlibabacloudOpenApi', '~> 1.0.5'
2323
spec.dependency 'AlibabaCloudOpenApiUtil', '~> 1.0.1'
2424
spec.dependency 'AlibabacloudEndpointUtil', '~> 1.0.0'
2525

Cartfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
github aliyun/tea-swift ~> 1.0.0
22
github alibabacloud-sdk-swift/tea-utils ~> 1.0.5
3-
github alibabacloud-sdk-swift/darabonba-openapi ~> 1.0.4
3+
github alibabacloud-sdk-swift/darabonba-openapi ~> 1.0.5
44
github alibabacloud-sdk-swift/openapi-util ~> 1.0.1
55
github alibabacloud-sdk-swift/endpoint-util ~> 1.0.0

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ let package = Package(
1717
// Dependencies declare other packages that this package depends on.
1818
.package(url: "https://github.com/aliyun/tea-swift.git", from: "1.0.0"),
1919
.package(url: "https://github.com/alibabacloud-sdk-swift/tea-utils", from: "1.0.5"),
20-
.package(url: "https://github.com/alibabacloud-sdk-swift/darabonba-openapi", from: "1.0.4"),
20+
.package(url: "https://github.com/alibabacloud-sdk-swift/darabonba-openapi", from: "1.0.5"),
2121
.package(url: "https://github.com/alibabacloud-sdk-swift/openapi-util", from: "1.0.1"),
2222
.package(url: "https://github.com/alibabacloud-sdk-swift/endpoint-util", from: "1.0.0"),
2323
],

README-CN.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
要使用 [Carthage](https://github.com/Carthage/Carthage)`AlibabacloudOcrApi20210707` 集成到你的 Xcode 项目中,需要在 `Cartfile` 中定义以下内容:
1818

1919
```ogdl
20-
github "alibabacloud-sdk-swift/ocr-api-20210707" "3.0.0"
20+
github "alibabacloud-sdk-swift/ocr-api-20210707" "3.1.0"
2121
```
2222

2323
### Swift 包管理工具
@@ -26,7 +26,7 @@ github "alibabacloud-sdk-swift/ocr-api-20210707" "3.0.0"
2626

2727
```swift
2828
dependencies: [
29-
.package(url: "https://github.com/alibabacloud-sdk-swift/ocr-api-20210707.git", from: "3.0.0")
29+
.package(url: "https://github.com/alibabacloud-sdk-swift/ocr-api-20210707.git", from: "3.1.0")
3030
]
3131
```
3232

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ English | [简体中文](README-CN.md)
1717
To integrate `AlibabacloudOcrApi20210707` into your Xcode project using [Carthage](https://github.com/Carthage/Carthage), specify it in your `Cartfile`:
1818

1919
```ogdl
20-
github "alibabacloud-sdk-swift/ocr-api-20210707" "3.0.0"
20+
github "alibabacloud-sdk-swift/ocr-api-20210707" "3.1.0"
2121
```
2222

2323
### Swift Package Manager
@@ -26,7 +26,7 @@ To integrate `AlibabacloudOcrApi20210707` into your Xcode project using [Swift P
2626

2727
```swift
2828
dependencies: [
29-
.package(url: "https://github.com/alibabacloud-sdk-swift/ocr-api-20210707.git", from: "3.0.0")
29+
.package(url: "https://github.com/alibabacloud-sdk-swift/ocr-api-20210707.git", from: "3.1.0")
3030
]
3131
```
3232

Sources/AlibabacloudOcrApi20210707/Client.swift

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1276,6 +1276,47 @@ open class Client : AlibabacloudOpenApi.Client {
12761276
return try await recognizeGeneralWithOptions(request as! RecognizeGeneralRequest, runtime as! TeaUtils.RuntimeOptions)
12771277
}
12781278

1279+
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
1280+
public func recognizeGeneralStructureWithOptions(_ tmpReq: RecognizeGeneralStructureRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> RecognizeGeneralStructureResponse {
1281+
try TeaUtils.Client.validateModel(tmpReq)
1282+
var request: RecognizeGeneralStructureShrinkRequest = RecognizeGeneralStructureShrinkRequest([:])
1283+
AlibabaCloudOpenApiUtil.Client.convert(tmpReq, request)
1284+
if (!TeaUtils.Client.isUnset(tmpReq.keys)) {
1285+
request.keysShrink = AlibabaCloudOpenApiUtil.Client.arrayToStringWithSpecifiedStyle(tmpReq.keys, "Keys", "simple")
1286+
}
1287+
var query: [String: Any] = [:]
1288+
if (!TeaUtils.Client.isUnset(request.keysShrink)) {
1289+
query["Keys"] = request.keysShrink ?? "";
1290+
}
1291+
if (!TeaUtils.Client.isUnset(request.url)) {
1292+
query["Url"] = request.url ?? "";
1293+
}
1294+
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
1295+
"query": AlibabaCloudOpenApiUtil.Client.query(query),
1296+
"body": request.body!,
1297+
"stream": tmpReq.body!
1298+
])
1299+
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
1300+
"action": "RecognizeGeneralStructure",
1301+
"version": "2021-07-07",
1302+
"protocol": "HTTPS",
1303+
"pathname": "/",
1304+
"method": "POST",
1305+
"authType": "AK",
1306+
"style": "RPC",
1307+
"reqBodyType": "formData",
1308+
"bodyType": "json"
1309+
])
1310+
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
1311+
return Tea.TeaConverter.fromMap(RecognizeGeneralStructureResponse(), tmp)
1312+
}
1313+
1314+
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
1315+
public func recognizeGeneralStructure(_ request: RecognizeGeneralStructureRequest) async throws -> RecognizeGeneralStructureResponse {
1316+
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
1317+
return try await recognizeGeneralStructureWithOptions(request as! RecognizeGeneralStructureRequest, runtime as! TeaUtils.RuntimeOptions)
1318+
}
1319+
12791320
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
12801321
public func recognizeHKIdcardWithOptions(_ request: RecognizeHKIdcardRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> RecognizeHKIdcardResponse {
12811322
try TeaUtils.Client.validateModel(request)

0 commit comments

Comments
 (0)