Skip to content

Commit 6c18de2

Browse files
committed
chore(Core): Merged in common changes
2 parents 4c18480 + 8a59a9a commit 6c18de2

14 files changed

+331
-127
lines changed

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ message = [skip ci] docs: Update version numbers from {current_version} -> {new_
55

66
[bumpversion:file:Doxyfile]
77

8-
[bumpversion:file:Scripts/Utilities/Constants.cs]
8+
[bumpversion:file:Common/Common.cs]
99
search = {current_version}
1010
replace = {new_version}

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ before_script:
2424
script:
2525
- ./Travis/createProject.sh
2626
- ./Travis/installSDK.sh
27-
- ./Travis/runTests.sh
27+
# - ./Travis/runTests.sh
2828
# - ./Travis/build.sh
2929
deploy:
3030
- provider: script

Common/Common.cs

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
/**
2+
* Copyright 2019 IBM Corp. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*
16+
*/
17+
18+
using IBM.Cloud.SDK.Utilities;
19+
using System.Collections.Generic;
20+
using UnityEngine;
21+
22+
namespace IBM.Watson
23+
{
24+
public class Common : MonoBehaviour
25+
{
26+
public const string Version = "watson-apis-unity-sdk-2.12.0";
27+
/// <summary>
28+
/// Returns a set of default headers to use with each request.
29+
/// </summary>
30+
/// <param name="serviceName">The service name to be used in X-IBMCloud-SDK-Analytics header.</param>
31+
/// <param name="serviceVersion">The service version to be used in X-IBMCloud-SDK-Analytics header.</param>
32+
/// <param name="operation">The operation name to be used in X-IBMCloud-SDK-Analytics header.</param>
33+
/// <returns></returns>
34+
public static Dictionary<string, string> GetDefaultheaders(string serviceName, string serviceVersion, string operationId)
35+
{
36+
Dictionary<string, string> defaultHeaders = new Dictionary<string, string>();
37+
defaultHeaders.Add("X-IBMCloud-SDK-Analytics",
38+
string.Format("service_name={0};service_version={1};operation_id={2}",
39+
serviceName,
40+
serviceVersion,
41+
operationId));
42+
defaultHeaders.Add("User-Agent",
43+
string.Format(
44+
"{0} {1} {2} {3}",
45+
Version,
46+
SystemInformation.Os,
47+
SystemInformation.OsVersion,
48+
Application.unityVersion
49+
));
50+
return defaultHeaders;
51+
}
52+
}
53+
}

Editor.meta

Lines changed: 0 additions & 8 deletions
This file was deleted.

Editor/Help.meta

Lines changed: 0 additions & 8 deletions
This file was deleted.

Editor/Help/Working.meta

Lines changed: 0 additions & 8 deletions
This file was deleted.

Editor/Help/Working/MRefBuilder.config.meta

Lines changed: 0 additions & 26 deletions
This file was deleted.

Editor/Help/Working/SHFBContent.xml.meta

Lines changed: 0 additions & 7 deletions
This file was deleted.

Editor/IBMCloudSignup.cs.meta

Lines changed: 0 additions & 11 deletions
This file was deleted.

Editor/WatsonMenu.cs.meta

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)