Skip to content

Commit 39ea749

Browse files
authored
Merge pull request #207 from watson-developer-cloud/rc-2.2.1
.NET Standard SDK v2.2.1
2 parents 8831ef3 + d0f4afd commit 39ea749

File tree

430 files changed

+12303
-2968
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

430 files changed

+12303
-2968
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
Change Log
22
==========
3+
## Version 2.2.1
4+
_2018-04-21_
5+
* New: Support for custom request and response headers ([#4311](https://github.ibm.com/Watson/developer-experience/issues/4311), [#206](https://github.com/watson-developer-cloud/dotnet-standard-sdk/pull/206)).
6+
37
## Version 2.2.0
48
_2018-04-09_
59
* New: Updated Visual Recognition with Core ML support ([4181](https://zenhub.innovate.ibm.com/app/workspace/o/watson/developer-experience/issues/4181), [201](https://github.com/watson-developer-cloud/dotnet-standard-sdk/pull/201)).

Doxyfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ PROJECT_NAME = "Watson Developer Cloud .NET Standard SDK"
3838
# could be handy for archiving the generated documentation or if some version
3939
# control system is used.
4040

41-
PROJECT_NUMBER = 2.2.0
41+
PROJECT_NUMBER = 2.2.1
4242

4343
# Using the PROJECT_BRIEF tag one can provide an optional one line description
4444
# for a project that appears at the top of each page and should give viewer a

IBM.WatsonDeveloperCloud.sln

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IBM.WatsonDeveloperCloud.As
105105
EndProject
106106
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IBM.WatsonDeveloperCloud.Assistant.v1.IntegrationTests", "test\IBM.WatsonDeveloperCloud.Assistant.v1.IntegrationTests\IBM.WatsonDeveloperCloud.Assistant.v1.IntegrationTests.csproj", "{8616701B-F226-4462-9949-DE1F2C88B194}"
107107
EndProject
108+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IBM.WatsonDeveloperCloud.Assistant.v1.UnitTests", "test\IBM.WatsonDeveloperCloud.Assistant.v1.UnitTests\IBM.WatsonDeveloperCloud.Assistant.v1.UnitTests.csproj", "{3FA3418E-F5C5-463B-B371-FF38093A7D9D}"
109+
EndProject
108110
Global
109111
GlobalSection(SolutionConfigurationPlatforms) = preSolution
110112
Debug|Any CPU = Debug|Any CPU
@@ -255,6 +257,10 @@ Global
255257
{8616701B-F226-4462-9949-DE1F2C88B194}.Debug|Any CPU.Build.0 = Debug|Any CPU
256258
{8616701B-F226-4462-9949-DE1F2C88B194}.Release|Any CPU.ActiveCfg = Release|Any CPU
257259
{8616701B-F226-4462-9949-DE1F2C88B194}.Release|Any CPU.Build.0 = Release|Any CPU
260+
{3FA3418E-F5C5-463B-B371-FF38093A7D9D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
261+
{3FA3418E-F5C5-463B-B371-FF38093A7D9D}.Debug|Any CPU.Build.0 = Debug|Any CPU
262+
{3FA3418E-F5C5-463B-B371-FF38093A7D9D}.Release|Any CPU.ActiveCfg = Release|Any CPU
263+
{3FA3418E-F5C5-463B-B371-FF38093A7D9D}.Release|Any CPU.Build.0 = Release|Any CPU
258264
EndGlobalSection
259265
GlobalSection(SolutionProperties) = preSolution
260266
HideSolutionNode = FALSE
@@ -309,6 +315,7 @@ Global
309315
{E3D238D7-7A09-4447-B836-8D6ABF4BFF80} = {28E61676-E9FF-4DA9-99CC-5E0D16F02380}
310316
{60793E3F-EF8D-4FF8-9C69-33D1ADBC3C39} = {E3D238D7-7A09-4447-B836-8D6ABF4BFF80}
311317
{8616701B-F226-4462-9949-DE1F2C88B194} = {E3D238D7-7A09-4447-B836-8D6ABF4BFF80}
318+
{3FA3418E-F5C5-463B-B371-FF38093A7D9D} = {E3D238D7-7A09-4447-B836-8D6ABF4BFF80}
312319
EndGlobalSection
313320
GlobalSection(ExtensibilityGlobals) = postSolution
314321
SolutionGuid = {B9D9D17B-1C17-402F-B701-DC671528690A}

README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,39 @@ You can get the latest SDK packages through NuGet. Installation instructions can
3737

3838
Or manually [here][latest_release].
3939

40+
## Custom Request Headers
41+
You can send custom request headers by adding them to the `customData` object.
42+
```cs
43+
void Example()
44+
{
45+
AssistantService assistant = new AssistantService("<username>", "<password>", "<version-date>");
46+
47+
// Create customData object
48+
Dictionary<string, object> customData = new Dictionary<string, object>();
49+
// Create a dictionary of custom headers
50+
Dictionary<string, string> customHeaders = new Dictionary<string, string>();
51+
// Add to the header dictionary
52+
customHeaders.Add("X-Watson-Metadata", "customer_id=some-assistant-customer-id");
53+
// Add the header dictionary to the custom data object
54+
customData.Add(Constants.String.CUSTOM_REQUEST_HEADERS, customHeaders);
55+
56+
var results = assistant.Message("<workspace-id>", "<message-request>", customData: customData);
57+
}
58+
```
59+
60+
## Response Headers
61+
You can get the response headers and the raw json response in the result object.
62+
```cs
63+
void Example()
64+
{
65+
AssistantService assistant = new AssistantService("<username>", "<password>", "<version-date>");
66+
var results = assistant.Message("<workspace-id>", "<message-request>");
67+
68+
var responseHeaders = results.ResponseHeaders; // The response headers
69+
var responseJson = results.ResponseJson; // The raw response json
70+
}
71+
```
72+
4073
## Documentation
4174
Click [here][dotnet-standard-sdk-documentation] for documentation by release and branch.
4275

appveyor.yml

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -100,35 +100,35 @@ after_build:
100100
Copy-Item C:\projects\dotnet-standard-sdk\test\IBM.WatsonDeveloperCloud.LanguageTranslator.v2.IntegrationTests\glossary.tmx C:\projects\dotnet-standard-sdk\glossary.tmx
101101
test_script:
102102
- ps: "if((Test-Path -Path coverage))\n{\n rm coverage -r -force\n}\nNew-Item -path . -name coverage -itemtype directory\nForEach ($folder in (Get-ChildItem -Path C:\\projects\\dotnet-standard-sdk\\test -Directory)) { \n if($env:APPVEYOR_PULL_REQUEST_NUMBER -eq $null)\n {\n Write-Output \"No pull request number. Executing tests\"\n dotnet test $folder.FullName\n if($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode ) }\n echo \"Test passed: $?\"\n echo \"LastExitCode: $LastExitCode\"\n $openCover = 'C:\\projects\\dotnet-standard-sdk\\packages\\OpenCover.4.6.519\\tools\\OpenCover.Console.exe' \n $targetArgs = '-targetargs: test ' + $folder.FullName + ' -c Release -f netcoreapp1.0'\n $filter = '-filter:+[IBM.WatsonDeveloperCloud*]*-[*Tests*]*-[*Example*]*'\n & $openCover '-target:C:\\Program Files\\dotnet\\dotnet.exe' $targetArgs '-register:user' $filter '-oldStyle' '-mergeoutput' '-hideskipped:File' '-searchdirs:$testdir\\bin\\release\\netcoreapp1.0' '-output:coverage\\coverage.xml'\n }\n else\n {\n Write-Output \"Pull request number is $env:APPVEYOR_PULL_REQUEST_NUMBER. Skipping tests.\"\n }\n }\n\nC:\\projects\\dotnet-standard-sdk\\packages\\ReportGenerator.2.4.5.0\\tools\\ReportGenerator.exe -reports:coverage\\coverage.xml -targetdir:coverage -verbosity:Error\n\nif($env:COVERALLS_REPO_TOKEN)\n{\n C:\\projects\\dotnet-standard-sdk\\packages\\coveralls.net.0.7.0\\tools\\csmacnz.Coveralls.exe --opencover -i coverage\\coverage.xml --useRelativePaths\n}\nelse\n{\n Write-Output \"There is no Coveralls Repo Token - not pushing coverage.\"\n}"
103-
# artifacts:
104-
# - path: '\src\IBM.WatsonDeveloperCloud\bin\$(configuration)\*.nupkg'
105-
# name: IBM.WatsonDeveloperCloud
106-
# - path: '\src\IBM.WatsonDeveloperCloud.Assistant.v1\bin\$(configuration)\*.nupkg'
107-
# name: IBM.WatsonDeveloperCloud.Assistant.v1
108-
# - path: '\src\IBM.WatsonDeveloperCloud.Conversation.v1\bin\$(configuration)\*.nupkg'
109-
# name: IBM.WatsonDeveloperCloud.Conversation.v1
110-
# - path: '\src\IBM.WatsonDeveloperCloud.LanguageTranslator.v2\bin\$(configuration)\*.nupkg'
111-
# name: IBM.WatsonDeveloperCloud.LanguageTranslator.v2
112-
# - path: '\src\IBM.WatsonDeveloperCloud.PersonalityInsights.v3\bin\$(configuration)\*.nupkg'
113-
# name: IBM.WatsonDeveloperCloud.PersonalityInsights.v3
114-
# - path: '\src\IBM.WatsonDeveloperCloud.SpeechToText.v1\bin\$(configuration)\*.nupkg'
115-
# name: IBM.WatsonDeveloperCloud.SpeechToText.v1
116-
# - path: '\src\IBM.WatsonDeveloperCloud.TextToSpeech.v1\bin\$(configuration)\*.nupkg'
117-
# name: IBM.WatsonDeveloperCloud.TextToSpeech.v1
118-
# - path: '\src\IBM.WatsonDeveloperCloud.ToneAnalyzer.v3\bin\$(configuration)\*.nupkg'
119-
# name: IBM.WatsonDeveloperCloud.ToneAnalyzer.v3
120-
# - path: '\src\IBM.WatsonDeveloperCloud.VisualRecognition.v3\bin\$(configuration)\*.nupkg'
121-
# name: IBM.WatsonDeveloperCloud.VisualRecognition.v3
122-
# - path: '\src\IBM.WatsonDeveloperCloud.Discovery.v1\bin\$(configuration)\*.nupkg'
123-
# name: IBM.WatsonDeveloperCloud.Discovery.v1
124-
# - path: '\src\IBM.WatsonDeveloperCloud.NaturalLanguageUnderstanding.v1\bin\$(configuration)\*.nupkg'
125-
# name: IBM.WatsonDeveloperCloud.NaturalLanguageUnderstanding.v1
126-
# - path: '\src\IBM.WatsonDeveloperCloud.NaturalLanguageClassifier.v1\bin\$(configuration)\*.nupkg'
127-
# name: IBM.WatsonDeveloperCloud.NaturalLanguageClassifier.v1
128-
# deploy:
129-
# - provider: NuGet
130-
# api_key:
131-
# secure: jVMsvYb86JW+UMN2Gb2m1JazRkouGMzd58NHWxWVAY1BsQbehIU+YTxdsAeMo1qy
132-
# on:
133-
# branch: master
134-
# APPVEYOR_REPO_TAG: true
103+
artifacts:
104+
- path: '\src\IBM.WatsonDeveloperCloud\bin\$(configuration)\*.nupkg'
105+
name: IBM.WatsonDeveloperCloud
106+
- path: '\src\IBM.WatsonDeveloperCloud.Assistant.v1\bin\$(configuration)\*.nupkg'
107+
name: IBM.WatsonDeveloperCloud.Assistant.v1
108+
- path: '\src\IBM.WatsonDeveloperCloud.Conversation.v1\bin\$(configuration)\*.nupkg'
109+
name: IBM.WatsonDeveloperCloud.Conversation.v1
110+
- path: '\src\IBM.WatsonDeveloperCloud.LanguageTranslator.v2\bin\$(configuration)\*.nupkg'
111+
name: IBM.WatsonDeveloperCloud.LanguageTranslator.v2
112+
- path: '\src\IBM.WatsonDeveloperCloud.PersonalityInsights.v3\bin\$(configuration)\*.nupkg'
113+
name: IBM.WatsonDeveloperCloud.PersonalityInsights.v3
114+
- path: '\src\IBM.WatsonDeveloperCloud.SpeechToText.v1\bin\$(configuration)\*.nupkg'
115+
name: IBM.WatsonDeveloperCloud.SpeechToText.v1
116+
- path: '\src\IBM.WatsonDeveloperCloud.TextToSpeech.v1\bin\$(configuration)\*.nupkg'
117+
name: IBM.WatsonDeveloperCloud.TextToSpeech.v1
118+
- path: '\src\IBM.WatsonDeveloperCloud.ToneAnalyzer.v3\bin\$(configuration)\*.nupkg'
119+
name: IBM.WatsonDeveloperCloud.ToneAnalyzer.v3
120+
- path: '\src\IBM.WatsonDeveloperCloud.VisualRecognition.v3\bin\$(configuration)\*.nupkg'
121+
name: IBM.WatsonDeveloperCloud.VisualRecognition.v3
122+
- path: '\src\IBM.WatsonDeveloperCloud.Discovery.v1\bin\$(configuration)\*.nupkg'
123+
name: IBM.WatsonDeveloperCloud.Discovery.v1
124+
- path: '\src\IBM.WatsonDeveloperCloud.NaturalLanguageUnderstanding.v1\bin\$(configuration)\*.nupkg'
125+
name: IBM.WatsonDeveloperCloud.NaturalLanguageUnderstanding.v1
126+
- path: '\src\IBM.WatsonDeveloperCloud.NaturalLanguageClassifier.v1\bin\$(configuration)\*.nupkg'
127+
name: IBM.WatsonDeveloperCloud.NaturalLanguageClassifier.v1
128+
deploy:
129+
- provider: NuGet
130+
api_key:
131+
secure: jVMsvYb86JW+UMN2Gb2m1JazRkouGMzd58NHWxWVAY1BsQbehIU+YTxdsAeMo1qy
132+
on:
133+
branch: master
134+
APPVEYOR_REPO_TAG: true

examples/IBM.WatsonDeveloperCloud.Conversation.v1.Example/IBM.WatsonDeveloperCloud.Conversation.v1.Example.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<VersionPrefix>2.2.0</VersionPrefix>
4+
<VersionPrefix>2.2.1</VersionPrefix>
55
<TargetFramework>netcoreapp1.0</TargetFramework>
66
<AssemblyName>IBM.WatsonDeveloperCloud.Conversation.v1.Example</AssemblyName>
77
<OutputType>Exe</OutputType>
@@ -10,7 +10,7 @@
1010
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
1111
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
1212
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
13-
<Version>2.2.0</Version>
13+
<Version>2.2.1</Version>
1414
</PropertyGroup>
1515

1616
<ItemGroup>

examples/IBM.WatsonDeveloperCloud.Discovery.v1.Example/IBM.WatsonDeveloperCloud.Discovery.v1.Example.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<VersionPrefix>2.2.0</VersionPrefix>
4+
<VersionPrefix>2.2.1</VersionPrefix>
55
<TargetFramework>netcoreapp1.0</TargetFramework>
66
<AssemblyName>IBM.WatsonDeveloperCloud.Discovery.v1.Example</AssemblyName>
77
<OutputType>Exe</OutputType>
@@ -10,7 +10,7 @@
1010
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
1111
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
1212
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
13-
<Version>2.2.0</Version>
13+
<Version>2.2.1</Version>
1414
</PropertyGroup>
1515

1616
<ItemGroup>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<VersionPrefix>2.2.0</VersionPrefix>
4+
<VersionPrefix>2.2.1</VersionPrefix>
55
<TargetFramework>netcoreapp1.0</TargetFramework>
66
<AssemblyName>IBM.WatsonDeveloperCloud.LanguageTranslator.v2.Example</AssemblyName>
77
<OutputType>Exe</OutputType>
@@ -10,7 +10,7 @@
1010
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
1111
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
1212
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
13-
<Version>2.2.0</Version>
13+
<Version>2.2.1</Version>
1414
</PropertyGroup>
1515

1616
<ItemGroup>

examples/IBM.WatsonDeveloperCloud.NaturalLanguageUnderstanding.v1.Ex/IBM.WatsonDeveloperCloud.NLU.v1.Example.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<VersionPrefix>2.2.0</VersionPrefix>
4+
<VersionPrefix>2.2.1</VersionPrefix>
55
<TargetFramework>netcoreapp1.0</TargetFramework>
66
<AssemblyName>IBM.WatsonDeveloperCloud.NaturalLanguageUnderstanding.v1.Ex</AssemblyName>
77
<OutputType>Exe</OutputType>
@@ -10,7 +10,7 @@
1010
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
1111
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
1212
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
13-
<Version>2.2.0</Version>
13+
<Version>2.2.1</Version>
1414
</PropertyGroup>
1515

1616
<ItemGroup>

examples/IBM.WatsonDeveloperCloud.PersonalityInsights.v3.Example/IBM.WatsonDeveloperCloud.PersonalityInsights.v3.Example.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<VersionPrefix>2.2.0</VersionPrefix>
4+
<VersionPrefix>2.2.1</VersionPrefix>
55
<TargetFramework>netcoreapp1.0</TargetFramework>
66
<AssemblyName>IBM.WatsonDeveloperCloud.PersonalityInsights.v3.Example</AssemblyName>
77
<OutputType>Exe</OutputType>
@@ -10,7 +10,7 @@
1010
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
1111
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
1212
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
13-
<Version>2.2.0</Version>
13+
<Version>2.2.1</Version>
1414
</PropertyGroup>
1515

1616
<ItemGroup>

0 commit comments

Comments
 (0)