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