@@ -22,18 +22,24 @@ import com.aliyun.ocr20191230.models.GetAsyncJobResultRequest;
22
22
import com.aliyun.ocr20191230.models.GetAsyncJobResultResponse ;
23
23
import com.aliyun.tearpc.models.Config ;
24
24
import com.aliyun.teautil.models.RuntimeOptions ;
25
+
25
26
public class Main {
27
+
26
28
public static void main (String [] args ) {
29
+
27
30
Config config = new Config ();
28
31
// your accessKeyId
29
32
config. accessKeyId = " ######" ;
30
33
// your accessKeySecret
31
34
config. accessKeySecret = " #######" ;
32
35
config. endpoint = " ocr.cn-shanghai.aliyuncs.com" ;
36
+
33
37
// create and initialize a DefaultAcsClient instance
34
38
Client client = new Client (config);
39
+
35
40
GetAsyncJobResultRequest resultRequest = new GetAsyncJobResultRequest ();
36
41
resultRequest. jobId = " test" ;
42
+
37
43
GetAsyncJobResultResponse resultResponse = client. getAsyncJobResult(resultRequest, new RuntimeOptions ());
38
44
}
39
45
}
@@ -91,16 +97,22 @@ import com.aliyun.ocr20191230.models.GetAsyncJobResultRequest;
91
97
import com.aliyun.ocr20191230.models.GetAsyncJobResultResponse ;
92
98
import com.aliyun.tearpc.models.Config ;
93
99
import com.aliyun.teautil.models.RuntimeOptions ;
100
+
94
101
public class Main {
102
+
95
103
public static void main (String [] args ) {
104
+
96
105
Config config = new Config ();
97
106
// enable the default credential chain
98
107
config. credential = new com.aliyun.credentials. Client (null );
99
108
config. endpoint = " ocr.cn-shanghai.aliyuncs.com" ;
109
+
100
110
// create and initialize a DefaultAcsClient instance
101
111
Client client = new Client (config);
112
+
102
113
GetAsyncJobResultRequest resultRequest = new GetAsyncJobResultRequest ();
103
114
resultRequest. jobId = " test" ;
115
+
104
116
GetAsyncJobResultResponse resultResponse = client. getAsyncJobResult(resultRequest, new RuntimeOptions ());
105
117
}
106
118
}
0 commit comments