1
1
/**
2
- * (C) Copyright IBM Corp. 2018, 2020 .
2
+ * Copyright 2018, 2019 IBM Corp. All Rights Reserved .
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -72,6 +72,7 @@ public CompareComplyService(string versionDate) : this(versionDate, ConfigBasedA
72
72
public CompareComplyService ( string versionDate , Authenticator authenticator ) : base ( versionDate , authenticator , serviceId )
73
73
{
74
74
Authenticator = authenticator ;
75
+
75
76
if ( string . IsNullOrEmpty ( versionDate ) )
76
77
{
77
78
throw new ArgumentNullException ( "A versionDate (format `yyyy-mm-dd`) is required to create an instance of CompareComplyService" ) ;
@@ -81,7 +82,6 @@ public CompareComplyService(string versionDate, Authenticator authenticator) : b
81
82
VersionDate = versionDate ;
82
83
}
83
84
84
-
85
85
if ( string . IsNullOrEmpty ( GetServiceUrl ( ) ) )
86
86
{
87
87
SetServiceUrl ( defaultServiceUrl ) ;
@@ -142,6 +142,7 @@ public bool ConvertToHtml(Callback<HTMLReturn> callback, System.IO.MemoryStream
142
142
143
143
Connector . URL = GetServiceUrl ( ) + "/v1/html_conversion" ;
144
144
Authenticator . Authenticate ( Connector ) ;
145
+
145
146
return Connector . Send ( req ) ;
146
147
}
147
148
@@ -223,6 +224,7 @@ public bool ClassifyElements(Callback<ClassifyReturn> callback, System.IO.Memory
223
224
224
225
Connector . URL = GetServiceUrl ( ) + "/v1/element_classification" ;
225
226
Authenticator . Authenticate ( Connector ) ;
227
+
226
228
return Connector . Send ( req ) ;
227
229
}
228
230
@@ -304,6 +306,7 @@ public bool ExtractTables(Callback<TableReturn> callback, System.IO.MemoryStream
304
306
305
307
Connector . URL = GetServiceUrl ( ) + "/v1/tables" ;
306
308
Authenticator . Authenticate ( Connector ) ;
309
+
307
310
return Connector . Send ( req ) ;
308
311
}
309
312
@@ -403,6 +406,7 @@ public bool CompareDocuments(Callback<CompareReturn> callback, System.IO.MemoryS
403
406
404
407
Connector . URL = GetServiceUrl ( ) + "/v1/comparison" ;
405
408
Authenticator . Authenticate ( Connector ) ;
409
+
406
410
return Connector . Send ( req ) ;
407
411
}
408
412
@@ -486,6 +490,7 @@ public bool AddFeedback(Callback<FeedbackReturn> callback, FeedbackDataInput fee
486
490
487
491
Connector . URL = GetServiceUrl ( ) + "/v1/feedback" ;
488
492
Authenticator . Authenticate ( Connector ) ;
493
+
489
494
return Connector . Send ( req ) ;
490
495
}
491
496
@@ -654,6 +659,7 @@ public bool ListFeedback(Callback<FeedbackList> callback, string feedbackType =
654
659
655
660
Connector . URL = GetServiceUrl ( ) + "/v1/feedback" ;
656
661
Authenticator . Authenticate ( Connector ) ;
662
+
657
663
return Connector . Send ( req ) ;
658
664
}
659
665
@@ -729,6 +735,7 @@ public bool GetFeedback(Callback<GetFeedback> callback, string feedbackId, strin
729
735
730
736
Connector . URL = GetServiceUrl ( ) + string . Format ( "/v1/feedback/{0}" , feedbackId ) ;
731
737
Authenticator . Authenticate ( Connector ) ;
738
+
732
739
return Connector . Send ( req ) ;
733
740
}
734
741
@@ -804,6 +811,7 @@ public bool DeleteFeedback(Callback<FeedbackDeleted> callback, string feedbackId
804
811
805
812
Connector . URL = GetServiceUrl ( ) + string . Format ( "/v1/feedback/{0}" , feedbackId ) ;
806
813
Authenticator . Authenticate ( Connector ) ;
814
+
807
815
return Connector . Send ( req ) ;
808
816
}
809
817
@@ -939,6 +947,7 @@ public bool CreateBatch(Callback<BatchStatus> callback, string function, System.
939
947
940
948
Connector . URL = GetServiceUrl ( ) + "/v1/batches" ;
941
949
Authenticator . Authenticate ( Connector ) ;
950
+
942
951
return Connector . Send ( req ) ;
943
952
}
944
953
@@ -1003,6 +1012,7 @@ public bool ListBatches(Callback<Batches> callback)
1003
1012
1004
1013
Connector . URL = GetServiceUrl ( ) + "/v1/batches" ;
1005
1014
Authenticator . Authenticate ( Connector ) ;
1015
+
1006
1016
return Connector . Send ( req ) ;
1007
1017
}
1008
1018
@@ -1070,6 +1080,7 @@ public bool GetBatch(Callback<BatchStatus> callback, string batchId)
1070
1080
1071
1081
Connector . URL = GetServiceUrl ( ) + string . Format ( "/v1/batches/{0}" , batchId ) ;
1072
1082
Authenticator . Authenticate ( Connector ) ;
1083
+
1073
1084
return Connector . Send ( req ) ;
1074
1085
}
1075
1086
@@ -1153,6 +1164,7 @@ public bool UpdateBatch(Callback<BatchStatus> callback, string batchId, string a
1153
1164
1154
1165
Connector . URL = GetServiceUrl ( ) + string . Format ( "/v1/batches/{0}" , batchId ) ;
1155
1166
Authenticator . Authenticate ( Connector ) ;
1167
+
1156
1168
return Connector . Send ( req ) ;
1157
1169
}
1158
1170
0 commit comments