Skip to content

Commit 3942753

Browse files
authored
Merge pull request #120 from watson-developer-cloud/gh-91-XamarinSupport
Gh 91 xamarin support
2 parents b1266f5 + 2f6713b commit 3942753

File tree

39 files changed

+138
-291
lines changed
  • examples
  • src
  • test
    • IBM.WatsonDeveloperCloud.Conversation.v1.IntegrationTests
    • IBM.WatsonDeveloperCloud.Conversation.v1.UnitTests
    • IBM.WatsonDeveloperCloud.Discovery.v1.IntegrationTests
    • IBM.WatsonDeveloperCloud.Discovery.v1.UnitTests
    • IBM.WatsonDeveloperCloud.LanguageTranslator.v2.IntegrationTests
    • IBM.WatsonDeveloperCloud.LanguageTranslator.v2.UnitTests
    • IBM.WatsonDeveloperCloud.NaturalLanguageUnderstanding.v1.IntTests
    • IBM.WatsonDeveloperCloud.NaturalLanguageUnderstanding.v1.UnitTests
    • IBM.WatsonDeveloperCloud.PersonalityInsights.v3.IntegrationTests
    • IBM.WatsonDeveloperCloud.PersonalityInsights.v3.UnitTests
    • IBM.WatsonDeveloperCloud.SpeechToText.v1.IntegrationTests
    • IBM.WatsonDeveloperCloud.SpeechToText.v1.UnitTests
    • IBM.WatsonDeveloperCloud.TextToSpeech.v1.IntegrationTests
    • IBM.WatsonDeveloperCloud.TextToSpeech.v1.UnitTests
    • IBM.WatsonDeveloperCloud.ToneAnalyzer.v3.IntegrationTests
    • IBM.WatsonDeveloperCloud.ToneAnalyzer.v3.UnitTests
    • IBM.WatsonDeveloperCloud.VisualRecognition.v3.IntegrationTests
    • IBM.WatsonDeveloperCloud.VisualRecognition.v3.UnitTests

39 files changed

+138
-291
lines changed
Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,20 @@
11
{
2-
"version": "1.0.0",
2+
"version": "1.1.0",
33
"buildOptions": {
44
"emitEntryPoint": true
55
},
66

77
"dependencies": {
8-
"IBM.WatsonDeveloperCloud": "1.0.0",
9-
"IBM.WatsonDeveloperCloud.Conversation.v1": "1.0.0",
10-
"Microsoft.AspNet.WebApi.Client": "5.2.3",
8+
"IBM.WatsonDeveloperCloud": "1.1.0",
9+
"IBM.WatsonDeveloperCloud.Conversation.v1": "1.1.0",
1110
"Microsoft.NETCore.App": {
1211
"type": "platform",
1312
"version": "1.0.1"
1413
},
15-
"Newtonsoft.Json": "9.0.1",
16-
"System.Runtime.Serialization.Json": "4.0.1"
14+
"Newtonsoft.Json": "9.0.1"
1715
},
1816

1917
"frameworks": {
20-
"netcoreapp1.0": {
21-
"dependencies": {
22-
"System.Runtime.Serialization.Xml": "4.1.1"
23-
},
24-
"imports": [ "dnxcore50", "portable-net451+win8" ]
25-
}
18+
"netcoreapp1.0": { }
2619
}
2720
}
Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "1.0.0",
2+
"version": "1.1.0",
33
"buildOptions": {
44
"emitEntryPoint": true,
55
"copyToOutput": {
@@ -8,23 +8,16 @@
88
},
99

1010
"dependencies": {
11-
"IBM.WatsonDeveloperCloud": "1.0.0",
12-
"IBM.WatsonDeveloperCloud.Discovery.v1": "1.0.0",
13-
"Microsoft.AspNet.WebApi.Client": "5.2.3",
11+
"IBM.WatsonDeveloperCloud": "1.1.0",
12+
"IBM.WatsonDeveloperCloud.Discovery.v1": "1.1.0",
1413
"Microsoft.NETCore.App": {
1514
"type": "platform",
1615
"version": "1.0.1"
1716
},
18-
"Newtonsoft.Json": "9.0.1",
19-
"System.Runtime.Serialization.Json": "4.0.1"
17+
"Newtonsoft.Json": "9.0.1"
2018
},
2119

2220
"frameworks": {
23-
"netcoreapp1.0": {
24-
"dependencies": {
25-
"System.Runtime.Serialization.Xml": "4.1.1"
26-
},
27-
"imports": [ "dnxcore50", "portable-net451+win8" ]
28-
}
21+
"netcoreapp1.0": { }
2922
}
3023
}

examples/IBM.WatsonDeveloperCloud.LanguageTranslator.v2.Example/Example.cs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,23 @@
1414
* limitations under the License.
1515
*
1616
*/
17-
1817
using System;
18+
using System.IO;
19+
using Newtonsoft.Json.Linq;
1920

2021
namespace IBM.WatsonDeveloperCloud.LanguageTranslator.v2.Example
2122
{
2223
public class Example
2324
{
2425
static void Main(string[] args)
2526
{
26-
string _username = "<username>";
27-
string _password = "<password>";
27+
var environmentVariable = Environment.GetEnvironmentVariable("VCAP_SERVICES");
28+
var fileContent = File.ReadAllText(environmentVariable);
29+
var vcapServices = JObject.Parse(fileContent);
30+
var _username = vcapServices["language_translator"][0]["credentials"]["username"];
31+
var _password = vcapServices["language_translator"][0]["credentials"]["password"];
2832

29-
LanguageTranslatorServiceExample _languageTranslatorExample = new LanguageTranslatorServiceExample(_username, _password);
33+
LanguageTranslatorServiceExample _languageTranslatorExample = new LanguageTranslatorServiceExample(_username.ToString(), _password.ToString());
3034
Console.ReadKey();
3135
}
3236
}

examples/IBM.WatsonDeveloperCloud.LanguageTranslator.v2.Example/project.json

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,16 @@
11
{
2-
"version": "1.0.0",
2+
"version": "1.1.0",
33
"dependencies": {
4-
"IBM.WatsonDeveloperCloud": "1.0.0",
5-
"IBM.WatsonDeveloperCloud.LanguageTranslator.v2": "1.0.0",
6-
"Microsoft.AspNet.WebApi.Client": "5.2.3",
4+
"IBM.WatsonDeveloperCloud": "1.1.0",
5+
"IBM.WatsonDeveloperCloud.LanguageTranslator.v2": "1.1.0",
76
"Microsoft.NETCore.App": {
87
"type": "platform",
98
"version": "1.0.1"
109
},
11-
"Newtonsoft.Json": "9.0.1",
12-
"System.Runtime.Serialization.Json": "4.0.1"
10+
"Newtonsoft.Json": "9.0.1"
1311
},
1412
"frameworks": {
15-
"netcoreapp1.0": {
16-
"dependencies": {
17-
"System.Runtime.Serialization.Xml": "4.1.1"
18-
},
19-
"imports": [ "dnxcore50", "portable-net451+win8" ]
20-
}
13+
"netcoreapp1.0": { }
2114
},
2215
"buildOptions": {
2316
"emitEntryPoint": true,
Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,20 @@
11
{
2-
"version": "1.0.0",
2+
"version": "1.1.0",
33
"buildOptions": {
44
"emitEntryPoint": true
55
},
66

77
"dependencies": {
8-
"IBM.WatsonDeveloperCloud": "1.0.0",
9-
"IBM.WatsonDeveloperCloud.NaturalLanguageUnderstanding.v1": "1.0.0",
10-
"Microsoft.AspNet.WebApi.Client": "5.2.3",
8+
"IBM.WatsonDeveloperCloud": "1.1.0",
9+
"IBM.WatsonDeveloperCloud.NaturalLanguageUnderstanding.v1": "1.1.0",
1110
"Microsoft.NETCore.App": {
1211
"type": "platform",
1312
"version": "1.0.1"
1413
},
15-
"Newtonsoft.Json": "9.0.1",
16-
"System.Runtime.Serialization.Json": "4.0.1"
14+
"Newtonsoft.Json": "9.0.1"
1715
},
1816

1917
"frameworks": {
20-
"netcoreapp1.0": {
21-
"dependencies": {
22-
"System.Runtime.Serialization.Xml": "4.1.1"
23-
},
24-
"imports": [ "dnxcore50", "portable-net451+win8" ]
25-
}
18+
"netcoreapp1.0": { }
2619
}
2720
}

examples/IBM.WatsonDeveloperCloud.PersonalityInsights.v3.Example/project.json

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,16 @@
11
{
2-
"version": "1.0.0",
2+
"version": "1.1.0",
33
"dependencies": {
4-
"IBM.WatsonDeveloperCloud": "1.0.0",
5-
"IBM.WatsonDeveloperCloud.PersonalityInsights.v3": "1.0.0",
6-
"Microsoft.AspNet.WebApi.Client": "5.2.3",
4+
"IBM.WatsonDeveloperCloud": "1.1.0",
5+
"IBM.WatsonDeveloperCloud.PersonalityInsights.v3": "1.1.0",
76
"Microsoft.NETCore.App": {
87
"type": "platform",
98
"version": "1.0.1"
109
},
11-
"Newtonsoft.Json": "9.0.1",
12-
"System.Runtime.Serialization.Json": "4.0.1"
10+
"Newtonsoft.Json": "9.0.1"
1311
},
1412
"frameworks": {
15-
"netcoreapp1.0": {
16-
"dependencies": {
17-
"System.Runtime.Serialization.Xml": "4.1.1"
18-
},
19-
"imports": [ "dnxcore50", "portable-net451+win8" ]
20-
}
13+
"netcoreapp1.0": { }
2114
},
2215
"buildOptions": {
2316
"emitEntryPoint": true,

examples/IBM.WatsonDeveloperCloud.SpeechToText.v1.Example/project.json

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,16 @@
11
{
2-
"version": "1.0.0",
2+
"version": "1.1.0",
33
"dependencies": {
4-
"IBM.WatsonDeveloperCloud": "1.0.0",
5-
"IBM.WatsonDeveloperCloud.SpeechToText.v1": "1.0.0",
6-
"Microsoft.AspNet.WebApi.Client": "5.2.3",
4+
"IBM.WatsonDeveloperCloud": "1.1.0",
5+
"IBM.WatsonDeveloperCloud.SpeechToText.v1": "1.1.0",
76
"Microsoft.NETCore.App": {
87
"type": "platform",
98
"version": "1.0.1"
109
},
11-
"Newtonsoft.Json": "9.0.1",
12-
"System.Runtime.Serialization.Json": "4.0.1"
10+
"Newtonsoft.Json": "9.0.1"
1311
},
1412
"frameworks": {
15-
"netcoreapp1.0": {
16-
"dependencies": {
17-
"System.Runtime.Serialization.Xml": "4.1.1"
18-
},
19-
"imports": [ "dnxcore50", "portable-net451+win8" ]
20-
}
13+
"netcoreapp1.0": { }
2114
},
2215
"buildOptions": {
2316
"emitEntryPoint": true,

examples/IBM.WatsonDeveloperCloud.TextToSpeech.v1.Example/project.json

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,16 @@
11
{
2-
"version": "1.0.0",
2+
"version": "1.1.0",
33
"dependencies": {
4-
"IBM.WatsonDeveloperCloud": "1.0.0",
5-
"IBM.WatsonDeveloperCloud.TextToSpeech.v1": "1.0.0",
6-
"Microsoft.AspNet.WebApi.Client": "5.2.3",
4+
"IBM.WatsonDeveloperCloud": "1.1.0",
5+
"IBM.WatsonDeveloperCloud.TextToSpeech.v1": "1.1.0",
76
"Microsoft.NETCore.App": {
87
"type": "platform",
98
"version": "1.0.1"
109
},
11-
"Newtonsoft.Json": "9.0.1",
12-
"System.Runtime.Serialization.Json": "4.0.1"
10+
"Newtonsoft.Json": "9.0.1"
1311
},
1412
"frameworks": {
15-
"netcoreapp1.0": {
16-
"dependencies": {
17-
"System.Runtime.Serialization.Xml": "4.1.1"
18-
},
19-
"imports": [ "dnxcore50", "portable-net451+win8" ]
20-
}
13+
"netcoreapp1.0": { }
2114
},
2215
"buildOptions": {
2316
"emitEntryPoint": true,

examples/IBM.WatsonDeveloperCloud.ToneAnalyzer.v3.Example/project.json

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,16 @@
11
{
2-
"version": "1.0.0",
2+
"version": "1.1.0",
33
"dependencies": {
4-
"IBM.WatsonDeveloperCloud": "1.0.0",
5-
"IBM.WatsonDeveloperCloud.ToneAnalyzer.v3": "1.0.0",
6-
"Microsoft.AspNet.WebApi.Client": "5.2.3",
4+
"IBM.WatsonDeveloperCloud": "1.1.0",
5+
"IBM.WatsonDeveloperCloud.ToneAnalyzer.v3": "1.1.0",
76
"Microsoft.NETCore.App": {
87
"type": "platform",
98
"version": "1.0.1"
109
},
11-
"Newtonsoft.Json": "9.0.1",
12-
"System.Runtime.Serialization.Json": "4.0.1"
10+
"Newtonsoft.Json": "9.0.1"
1311
},
1412
"frameworks": {
15-
"netcoreapp1.0": {
16-
"dependencies": {
17-
"System.Runtime.Serialization.Xml": "4.1.1"
18-
},
19-
"imports": [ "dnxcore50", "portable-net451+win8" ]
20-
}
13+
"netcoreapp1.0": { }
2114
},
2215
"buildOptions": {
2316
"emitEntryPoint": true,

examples/IBM.WatsonDeveloperCloud.VisualRecognition.v3.Example/project.json

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,16 @@
11
{
2-
"version": "1.0.0",
2+
"version": "1.1.0",
33
"dependencies": {
4-
"IBM.WatsonDeveloperCloud": "1.0.0",
5-
"IBM.WatsonDeveloperCloud.VisualRecognition.v3": "1.0.0",
6-
"Microsoft.AspNet.WebApi.Client": "5.2.3",
4+
"IBM.WatsonDeveloperCloud": "1.1.0",
5+
"IBM.WatsonDeveloperCloud.VisualRecognition.v3": "1.1.0",
76
"Microsoft.NETCore.App": {
87
"type": "platform",
98
"version": "1.0.1"
109
},
11-
"Newtonsoft.Json": "9.0.1",
12-
"System.Runtime.Serialization.Json": "4.0.1"
10+
"Newtonsoft.Json": "9.0.1"
1311
},
1412
"frameworks": {
15-
"netcoreapp1.0": {
16-
"dependencies": {
17-
"System.Runtime.Serialization.Xml": "4.1.1"
18-
},
19-
"imports": [ "dnxcore50", "portable-net451+win8" ]
20-
}
13+
"netcoreapp1.0": { }
2114
},
2215
"buildOptions": {
2316
"emitEntryPoint": true,

0 commit comments

Comments
 (0)