Skip to content

Commit 4aee41f

Browse files
committed
refactor: Refactored GetDefaultHeaders to GetSdkHeaders
1 parent 3850987 commit 4aee41f

File tree

13 files changed

+210
-210
lines changed

13 files changed

+210
-210
lines changed

Common/Common.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public class Common : MonoBehaviour
3838
/// <param name="serviceVersion">The service version to be used in X-IBMCloud-SDK-Analytics header.</param>
3939
/// <param name="operation">The operation name to be used in X-IBMCloud-SDK-Analytics header.</param>
4040
/// <returns></returns>
41-
public static Dictionary<string, string> GetDefaultheaders(string serviceName, string serviceVersion, string operationId)
41+
public static Dictionary<string, string> GetSdkHeaders(string serviceName, string serviceVersion, string operationId)
4242
{
4343
Dictionary<string, string> defaultHeaders = new Dictionary<string, string>();
4444
defaultHeaders.Add("X-IBMCloud-SDK-Analytics",

Scripts/Services/Assistant/V1/AssistantService.cs

Lines changed: 45 additions & 45 deletions
Large diffs are not rendered by default.

Scripts/Services/Assistant/V2/AssistantService.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ public bool CreateSession(Callback<SessionResponse> callback, string assistantId
165165
}
166166
}
167167

168-
foreach (KeyValuePair<string, string> kvp in Common.GetDefaultheaders("conversation", "V2", "CreateSession"))
168+
foreach (KeyValuePair<string, string> kvp in Common.GetSdkHeaders("conversation", "V2", "CreateSession"))
169169
{
170170
req.Headers.Add(kvp.Key, kvp.Value);
171171
}
@@ -256,7 +256,7 @@ public bool DeleteSession(Callback<object> callback, string assistantId, string
256256
}
257257
}
258258

259-
foreach (KeyValuePair<string, string> kvp in Common.GetDefaultheaders("conversation", "V2", "DeleteSession"))
259+
foreach (KeyValuePair<string, string> kvp in Common.GetSdkHeaders("conversation", "V2", "DeleteSession"))
260260
{
261261
req.Headers.Add(kvp.Key, kvp.Value);
262262
}
@@ -353,7 +353,7 @@ public bool Message(Callback<MessageResponse> callback, string assistantId, stri
353353
}
354354
}
355355

356-
foreach (KeyValuePair<string, string> kvp in Common.GetDefaultheaders("conversation", "V2", "Message"))
356+
foreach (KeyValuePair<string, string> kvp in Common.GetSdkHeaders("conversation", "V2", "Message"))
357357
{
358358
req.Headers.Add(kvp.Key, kvp.Value);
359359
}

Scripts/Services/CompareComply/V1/CompareComplyService.cs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ public bool ConvertToHtml(Callback<HTMLReturn> callback, System.IO.FileStream fi
165165
}
166166
}
167167

168-
foreach (KeyValuePair<string, string> kvp in Common.GetDefaultheaders("compare-comply", "V1", "ConvertToHtml"))
168+
foreach (KeyValuePair<string, string> kvp in Common.GetSdkHeaders("compare-comply", "V1", "ConvertToHtml"))
169169
{
170170
req.Headers.Add(kvp.Key, kvp.Value);
171171
}
@@ -263,7 +263,7 @@ public bool ClassifyElements(Callback<ClassifyReturn> callback, System.IO.FileSt
263263
}
264264
}
265265

266-
foreach (KeyValuePair<string, string> kvp in Common.GetDefaultheaders("compare-comply", "V1", "ClassifyElements"))
266+
foreach (KeyValuePair<string, string> kvp in Common.GetSdkHeaders("compare-comply", "V1", "ClassifyElements"))
267267
{
268268
req.Headers.Add(kvp.Key, kvp.Value);
269269
}
@@ -361,7 +361,7 @@ public bool ExtractTables(Callback<TableReturn> callback, System.IO.FileStream f
361361
}
362362
}
363363

364-
foreach (KeyValuePair<string, string> kvp in Common.GetDefaultheaders("compare-comply", "V1", "ExtractTables"))
364+
foreach (KeyValuePair<string, string> kvp in Common.GetSdkHeaders("compare-comply", "V1", "ExtractTables"))
365365
{
366366
req.Headers.Add(kvp.Key, kvp.Value);
367367
}
@@ -465,7 +465,7 @@ public bool CompareDocuments(Callback<CompareReturn> callback, System.IO.FileStr
465465
}
466466
}
467467

468-
foreach (KeyValuePair<string, string> kvp in Common.GetDefaultheaders("compare-comply", "V1", "CompareDocuments"))
468+
foreach (KeyValuePair<string, string> kvp in Common.GetSdkHeaders("compare-comply", "V1", "CompareDocuments"))
469469
{
470470
req.Headers.Add(kvp.Key, kvp.Value);
471471
}
@@ -575,7 +575,7 @@ public bool AddFeedback(Callback<FeedbackReturn> callback, FeedbackDataInput fee
575575
}
576576
}
577577

578-
foreach (KeyValuePair<string, string> kvp in Common.GetDefaultheaders("compare-comply", "V1", "AddFeedback"))
578+
foreach (KeyValuePair<string, string> kvp in Common.GetSdkHeaders("compare-comply", "V1", "AddFeedback"))
579579
{
580580
req.Headers.Add(kvp.Key, kvp.Value);
581581
}
@@ -672,7 +672,7 @@ public bool DeleteFeedback(Callback<FeedbackDeleted> callback, string feedbackId
672672
}
673673
}
674674

675-
foreach (KeyValuePair<string, string> kvp in Common.GetDefaultheaders("compare-comply", "V1", "DeleteFeedback"))
675+
foreach (KeyValuePair<string, string> kvp in Common.GetSdkHeaders("compare-comply", "V1", "DeleteFeedback"))
676676
{
677677
req.Headers.Add(kvp.Key, kvp.Value);
678678
}
@@ -762,7 +762,7 @@ public bool GetFeedback(Callback<GetFeedback> callback, string feedbackId, Dicti
762762
}
763763
}
764764

765-
foreach (KeyValuePair<string, string> kvp in Common.GetDefaultheaders("compare-comply", "V1", "GetFeedback"))
765+
foreach (KeyValuePair<string, string> kvp in Common.GetSdkHeaders("compare-comply", "V1", "GetFeedback"))
766766
{
767767
req.Headers.Add(kvp.Key, kvp.Value);
768768
}
@@ -885,7 +885,7 @@ public bool ListFeedback(Callback<FeedbackList> callback, Dictionary<string, obj
885885
}
886886
}
887887

888-
foreach (KeyValuePair<string, string> kvp in Common.GetDefaultheaders("compare-comply", "V1", "ListFeedback"))
888+
foreach (KeyValuePair<string, string> kvp in Common.GetSdkHeaders("compare-comply", "V1", "ListFeedback"))
889889
{
890890
req.Headers.Add(kvp.Key, kvp.Value);
891891
}
@@ -1067,7 +1067,7 @@ public bool CreateBatch(Callback<BatchStatus> callback, string function, System.
10671067
}
10681068
}
10691069

1070-
foreach (KeyValuePair<string, string> kvp in Common.GetDefaultheaders("compare-comply", "V1", "CreateBatch"))
1070+
foreach (KeyValuePair<string, string> kvp in Common.GetSdkHeaders("compare-comply", "V1", "CreateBatch"))
10711071
{
10721072
req.Headers.Add(kvp.Key, kvp.Value);
10731073
}
@@ -1184,7 +1184,7 @@ public bool GetBatch(Callback<BatchStatus> callback, string batchId, Dictionary<
11841184
}
11851185
}
11861186

1187-
foreach (KeyValuePair<string, string> kvp in Common.GetDefaultheaders("compare-comply", "V1", "GetBatch"))
1187+
foreach (KeyValuePair<string, string> kvp in Common.GetSdkHeaders("compare-comply", "V1", "GetBatch"))
11881188
{
11891189
req.Headers.Add(kvp.Key, kvp.Value);
11901190
}
@@ -1265,7 +1265,7 @@ public bool ListBatches(Callback<Batches> callback, Dictionary<string, object> c
12651265
}
12661266
}
12671267

1268-
foreach (KeyValuePair<string, string> kvp in Common.GetDefaultheaders("compare-comply", "V1", "ListBatches"))
1268+
foreach (KeyValuePair<string, string> kvp in Common.GetSdkHeaders("compare-comply", "V1", "ListBatches"))
12691269
{
12701270
req.Headers.Add(kvp.Key, kvp.Value);
12711271
}
@@ -1357,7 +1357,7 @@ public bool UpdateBatch(Callback<BatchStatus> callback, string batchId, string a
13571357
}
13581358
}
13591359

1360-
foreach (KeyValuePair<string, string> kvp in Common.GetDefaultheaders("compare-comply", "V1", "UpdateBatch"))
1360+
foreach (KeyValuePair<string, string> kvp in Common.GetSdkHeaders("compare-comply", "V1", "UpdateBatch"))
13611361
{
13621362
req.Headers.Add(kvp.Key, kvp.Value);
13631363
}

0 commit comments

Comments
 (0)