Skip to content

Commit 92091f7

Browse files
committed
fix language references
1 parent 7122943 commit 92091f7

File tree

4 files changed

+11
-10
lines changed

4 files changed

+11
-10
lines changed

Examples/ServiceExamples/Scripts/ExamplePersonalityInsightsV3.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ void Start () {
3030

3131
dataPath = Application.dataPath + "/Watson/Examples/ServiceExamples/TestData/personalityInsights.json";
3232

33-
if(!m_personalityInsights.GetProfile(OnGetProfileJson, dataPath, ContentType.TEXT_HTML, Language.ENGLISH, ContentType.APPLICATION_JSON, Language.ENGLISH, true, true, true))
33+
if(!m_personalityInsights.GetProfile(OnGetProfileJson, dataPath, ContentType.TEXT_HTML, ContentLanguage.ENGLISH, ContentType.APPLICATION_JSON, AcceptLanguage.ENGLISH, true, true, true))
3434
Log.Debug("ExamplePersonalityInsights", "Failed to get profile!");
3535

36-
if (!m_personalityInsights.GetProfile(OnGetProfileText, testString, ContentType.TEXT_HTML, Language.ENGLISH, ContentType.APPLICATION_JSON, Language.ENGLISH, true, true, true))
36+
if (!m_personalityInsights.GetProfile(OnGetProfileText, testString, ContentType.TEXT_HTML, ContentLanguage.ENGLISH, ContentType.APPLICATION_JSON, AcceptLanguage.ENGLISH, true, true, true))
3737
Log.Debug("ExamplePersonalityInsights", "Failed to get profile!");
3838
}
3939
private void OnGetProfileText(Profile profile, string data)

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1564,16 +1564,17 @@ The IBM Watson™ [Personality Insights][personality_insights] service enables a
15641564
```cs
15651565
PersonalityInsights m_personalityInsights = new PersonalityInsights();
15661566
private string testString = "<text-here>"";
1567+
private string dataPath;
15671568

15681569
void Start () {
15691570
LogSystem.InstallDefaultReactors();
15701571

1571-
string dataPath = Application.dataPath + "/Watson/Examples/ServiceExamples/TestData/personalityInsights.json";
1572+
dataPath = Application.dataPath + "/Watson/Examples/ServiceExamples/TestData/personalityInsights.json";
15721573

1573-
if(!m_personalityInsights.GetProfile(OnGetProfileJson, dataPath, ContentType.TEXT_HTML, Language.ENGLISH, ContentType.APPLICATION_JSON, Language.ENGLISH, true, true, true))
1574+
if(!m_personalityInsights.GetProfile(OnGetProfileJson, dataPath, ContentType.TEXT_HTML, ContentLanguage.ENGLISH, ContentType.APPLICATION_JSON, AcceptLanguage.ENGLISH, true, true, true))
15741575
Log.Debug("ExamplePersonalityInsights", "Failed to get profile!");
15751576

1576-
if (!m_personalityInsights.GetProfile(OnGetProfileText, testString, ContentType.TEXT_HTML, Language.ENGLISH, ContentType.APPLICATION_JSON, Language.ENGLISH, true, true, true))
1577+
if (!m_personalityInsights.GetProfile(OnGetProfileText, testString, ContentType.TEXT_HTML, ContentLanguage.ENGLISH, ContentType.APPLICATION_JSON, AcceptLanguage.ENGLISH, true, true, true))
15771578
Log.Debug("ExamplePersonalityInsights", "Failed to get profile!");
15781579
}
15791580
private void OnGetProfileText(Profile profile, string data)

Scripts/Services/PersonalityInsights/v3/PersonalityInsights.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ public class PersonalityInsights : IWatsonService
4444

4545
public bool GetProfile(OnGetProfile callback, string source,
4646
string contentType = ContentType.TEXT_PLAIN,
47-
string contentLanguage = Language.ENGLISH,
47+
string contentLanguage = ContentLanguage.ENGLISH,
4848
string accept = ContentType.APPLICATION_JSON,
49-
string acceptLanguage = Language.ENGLISH,
49+
string acceptLanguage = AcceptLanguage.ENGLISH,
5050
bool raw_scores = false,
5151
bool csv_headers = false,
5252
bool consumption_preferences = false,
@@ -164,7 +164,7 @@ public CheckServiceStatus(PersonalityInsights service, ServiceStatus callback)
164164
m_Service = service;
165165
m_Callback = callback;
166166
string dataPath = Application.dataPath + "/Watson/Examples/ServiceExamples/TestData/personalityInsights.json";
167-
if (!m_Service.GetProfile(OnGetProfile, dataPath, ContentType.TEXT_PLAIN, Language.ENGLISH))
167+
if (!m_Service.GetProfile(OnGetProfile, dataPath, ContentType.TEXT_PLAIN, ContentLanguage.ENGLISH))
168168
m_Callback(SERVICE_ID, false);
169169
}
170170

Scripts/UnitTests/TestPersonalityInsightsV3.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ public override IEnumerator RunTest()
3939
yield break;
4040

4141
Log.Debug("TestPersonalityInsightsV3", "Attempting GetProfile using Text!");
42-
m_personalityInsights.GetProfile(OnGetProfileText, testString, ContentType.TEXT_HTML, Language.ENGLISH, ContentType.APPLICATION_JSON, Language.ENGLISH, true, true, true);
42+
m_personalityInsights.GetProfile(OnGetProfileText, testString, ContentType.TEXT_HTML, ContentLanguage.ENGLISH, ContentType.APPLICATION_JSON, AcceptLanguage.ENGLISH, true, true, true);
4343
while(!m_GetProfileTextTested)
4444
yield return null;
4545

4646
Log.Debug("TestPersonalityInsightsV3", "Attempting GetProfile using Json!");
47-
m_personalityInsights.GetProfile(OnGetProfileJson, dataPath, ContentType.TEXT_HTML, Language.ENGLISH, ContentType.APPLICATION_JSON, Language.ENGLISH, true, true, true);
47+
m_personalityInsights.GetProfile(OnGetProfileJson, dataPath, ContentType.TEXT_HTML, ContentLanguage.ENGLISH, ContentType.APPLICATION_JSON, AcceptLanguage.ENGLISH, true, true, true);
4848
while(!m_GetProfileJsonTested)
4949
yield return null;
5050

0 commit comments

Comments
 (0)