Skip to content

Commit

Permalink
Release 1.0.0 (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
jridfe authored Jun 29, 2021
1 parent c60720f commit cdf28b2
Show file tree
Hide file tree
Showing 43 changed files with 5,648 additions and 3,414 deletions.
26 changes: 0 additions & 26 deletions MIGRATION-V0.3.0.md

This file was deleted.

85 changes: 85 additions & 0 deletions MIGRATION-V1.0.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# Upgrading to ABAP SDK version 1.0.0

Note: If migrating from a version less than v0.3.0, also see the
[v0.3.0 migration guide
wiki](https://github.com/watson-developer-cloud/abap-sdk-nwas/blob/0.3.0/MIGRATION-V0.3.0.md).

<details>
<summary>Table of Contents</summary>

- [Breaking changes](#breaking-changes)
- [Breaking changes by service](#breaking-changes-by-service)
- [Watson Assistant V1](#watson-assistant-v1)
- [Watson Assistant V2](#watson-assistant-v2)
- [Compare and Comply V1](#compare-and-comply-v1)
- [Discovery V2](#discovery-v2)
- [Text to Speech V1](#text-to-speech-v1)
- [Discontinued services](#discontinued-services)
- [Compare and Comply V1](#compare-and-comply-v1-1)
- [Personality Insights V3](#personality-insights-v3)
- [Visual Recognition V3 and V4](#visual-recognition-v3-and-v4)

</details>

## Breaking changes

### Breaking changes by service

#### Watson Assistant V1

Data types `t_Dialog_Node_Output_Generic` and `t_Runtime_Response_Generic` were changed from structures with several components (`RESPONSE_TYPE`, `TEXT`, `VALUES`, ...) to data type `JSONOBJECT`. Depending on the expected data type, data type `JSONOBJECT` must be mapped to the corresponding data structure, for example `t_Dia_Nd_Otpt_Gnrc_Dia_Nd_Otp1` (dialog node output generic) or `t_Rt_Resp_Gnrc_Rt_Resp_Typ_Txt` (runtime response generic).

When you fill in one of these structures and want to assign this structure to a variable of type `JSONOBJECT`, you can use the reference operator `REF` or the deprecated form `GET REFERENCE OF` to perform the mapping. When you receive data in a variable of type `JSONOBJECT` and need to map it to one of these structures, you can use method `move_data_reference_to_abap`, which is provided in the service class `zcl_ibmc_service`.

#### Watson Assistant V2

Data type `t_Runtime_Response_Generic` was changed from a structure with several components (`RESPONSE_TYPE`, `TEXT`, ...) to data type `JSONOBJECT`. Depending on the expected data type, data type `JSONOBJECT` must be mapped to the corresponding data structure, for example `t_Rt_Resp_Gnrc_Rt_Resp_Typ_Txt`.

When you fill in one of these structures and want to assign this structure to a variable of type `JSONOBJECT`, you can use the reference operator `REF` or the deprecated form `GET REFERENCE OF` to perform the mapping. When you receive data in a variable of type `JSONOBJECT` and need to map it to one of these structures, you can use method `move_data_reference_to_abap`, which is provided in the service class `zcl_ibmc_service`.

#### Compare and Comply V1

Parameters `I_BEFORE` and `I_AFTER` have been removed from method `LIST_FEEDBACK`.

#### Discovery V2

The Discovery V2 interface is available for Premium Discovery instances only and not supported by the ABAP SDK.

#### Text to Speech V1

The following types were renamed:

| Old name | New name |
|:-----------------------|:------------------------|
| `t_Voice_Model` | `t_Custom_Model` |
| `t_Voice_Models` | `t_Custom_Models` |
| `t_Create_Voice_Model` | `t_Create_Custom_Model` |
| `t_Update_Voice_Model` | `t_Update_Custom_Model` |

The following methods were renamed:

| Old name | New name |
|:---------------------|:----------------------|
| `create_Voice_Model` | `create_Custom_Model` |
| `get_Voice_Model` | `get_Custom_Model` |
| `update_Voice_Model` | `update_Custom_Model` |
| `delete_Voice_Model` | `delete_Custom_Model` |
| `list_Voice_Models` | `list_Custom_Models` |


### Discontinued services

The following services are discontinued. New service instances cannot be created anymore. The ABAP SDK still includes interfaces to these services, which cannot be used anymore when IBM support of the corresponding service ends.

#### Compare and Comply V1

Existing instances are supported until 30 November 2021 and will be deleted afterwards.

#### Personality Insights V3

Existing instances are supported until 1 December 2021 and will be deleted afterwards.

#### Visual Recognition V3 and V4

Existing instances are supported until 1 December 2021 and will be deleted afterwards.

95 changes: 20 additions & 75 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ Additionally, as the ABAP SDK is a community release it is not updated with the
</details>

## ANNOUNCEMENTS
### Minor version 0.3.0 released
Version v0.3.0 of the SDK has been released and includes one breaking change - see what's changed in the [migration guide](MIGRATION-V0.3.0.md).
### Major version 1.0.0 released
Version v1.0.0 of the SDK has been released and includes breaking changes - see what's changed in the [migration guide](MIGRATION-V1.0.0.md).

## Before you begin
* You need an [IBM Cloud][ibm_cloud_onboarding] account.
Expand Down Expand Up @@ -184,21 +184,23 @@ Afterwards, service methods can be called as long as the provided token is valid
The client library is delivered as package *ZIBMC*. Once the Git Repository has been cloned to the SAP system, a Watson service instance is wrapped by an ABAP class instance.<br>
The following Watson services are currently supported:

| Service | ABAP Class Name |
|:------------------------------ |:------------------------------ |
| Compare and Comply | ZCL_IBMC_COMPARE_COMPLY_V1 |
| Discovery | ZCL_IBMC_DISCOVERY_V1 |
| Language Translator | ZCL_IBMC_LANG_TRANSLATOR_V3 |
| Natural Language Classifier | ZCL_IBMC_NAT_LANG_CLASS_V1 |
| Natural Language Understanding | ZCL_IBMC_NAT_LANG_UNDRSTND_V1 |
| Personality Insights | ZCL_IBMC_PERSONAL_INSIGHTS_V3 |
| Speech to Text | ZCL_IBMC_SPEECH_TO_TEXT_V1 |
| Text to Speech | ZCL_IBMC_TEXT_TO_SPEECH_V1 |
| Tone Analyzer | ZCL_IBMC_TONE_ANALYZER_V3 |
| Visual Recognition | ZCL_IBMC_VISUAL_RECOGNITION_V3 |
| | ZCL_IBMC_VISUAL_RECOGNITION_V4 |
| Watson Assistant | ZCL_IBMC_ASSISTANT_V1 |
| | ZCL_IBMC_ASSISTANT_V2 |
| Service | ABAP Class Name |
|:------------------------------ |:----------------------------------- |
| Compare and Comply | ZCL_IBMC_COMPARE_COMPLY_V1 (\*) |
| Discovery | ZCL_IBMC_DISCOVERY_V1 |
| Language Translator | ZCL_IBMC_LANG_TRANSLATOR_V3 |
| Natural Language Classifier | ZCL_IBMC_NAT_LANG_CLASS_V1 |
| Natural Language Understanding | ZCL_IBMC_NAT_LANG_UNDRSTND_V1 |
| Personality Insights | ZCL_IBMC_PERSONAL_INSIGHTS_V3 (\*) |
| Speech to Text | ZCL_IBMC_SPEECH_TO_TEXT_V1 |
| Text to Speech | ZCL_IBMC_TEXT_TO_SPEECH_V1 |
| Tone Analyzer | ZCL_IBMC_TONE_ANALYZER_V3 |
| Visual Recognition | ZCL_IBMC_VISUAL_RECOGNITION_V3 (\*) |
| | ZCL_IBMC_VISUAL_RECOGNITION_V4 (\*) |
| Watson Assistant | ZCL_IBMC_ASSISTANT_V1 |
| | ZCL_IBMC_ASSISTANT_V2 |

(\*) Deprecated service; will be discontinued in the future.

Using the client library requires two steps:

Expand Down Expand Up @@ -318,63 +320,6 @@ Using the client library requires two steps:

</details>

<details>
<summary>Personality Insights Example</summary>

```abap
* Analyze profile using example text using Watson Personality Insights
" declare variables
data:
lv_apikey type string value '...',
lo_personality_insights type ref to zcl_ibmc_personal_insights_v3,
lo_service_exception type ref to zcx_ibmc_service_exception,
ls_content_item type zcl_ibmc_personal_insights_v3=>t_content_item,
ls_response type zcl_ibmc_personal_insights_v3=>t_profile,
ls_content type zcl_ibmc_personal_insights_v3=>t_content,
lv_content_language type string value 'en',
lv_accept_language type string value 'en',
lv_raw_scores type boolean value 'C_BOOLEAN_FALSE',
lv_csv_headers type boolean valiue 'C_BOOLEAN_FALSE',
lv_consumption_preferences type boolean value 'C_BOOLEAN_FALSE',
lv_accept type string value 'text/csv'.
" get Watson Personality Insights service instance
zcl_ibmc_service_ext=>get_instance(
exporting
i_url = 'https://api.eu-gb.personality-insights.watson.cloud.ibm.com/instances/<uuid>'
i_apikey = lv_apikey
i_version = '2018-05-01'
importing
eo_instance = lo_personality_insights ).
" store text to be analyzed into ls_content
" concatenate ... into ls_content_item-content
" append ls_content_item to ls_content-contentitems
" call Watson Personality Insights service to analyze text in ls_content
try.
lo_personality_insights->profile(
exporting
i_content = ls_content
i_content_language = lv_content_language
i_accept_language = lv_accept_language
i_raw_scores = lv_raw_scores
i_csv_headers = lv_csv_headers
i_consumption_preferences = lv_consumption_preferences
importing
e_response = ls_response ).
catch zcx_ibmc_service_exception into lo_service_exception.
message lo_service_exception type 'E'.
endtry.
" retreive profile analysis results from ls_response
```

</details>

<details>
<summary>Language Translator Example</summary>

Expand Down Expand Up @@ -434,7 +379,7 @@ GitHub Pages contain the [ABAP Client Library for Watson API Reference](https://

The ABAP SDK is a Community SDK for IBM Watson, created by the IBM Watson development community and SAP's ABAP development community - written by ABAPers from IBM Cloud, IBM Services and IBM Systems. Therefore as a community release it is not updated with the same schedule as IBM-supported SDKs, and does not include support by IBM. For more information on IBM-supported SDKs and the update policy, please see https://cloud.ibm.com/docs/watson?topic=watson-using-sdks

If you have questions about the IBM Watson services or are having difficulties using the APIs, please ask a question at [dW Answers](https://developer.ibm.com/answers/questions/ask/?topics=watson) or [Stack Overflow](http://stackoverflow.com/questions/ask?tags=ibm-watson-cognitive).
If you have questions about the IBM Watson services or are having difficulties using the APIs, please ask a question at [IBM Support Forums](https://www.ibm.com/mysupport/s/forumshome) or [Stack Overflow](http://stackoverflow.com/questions/ask?tags=ibm-watson-cognitive).

## License

Expand Down
Loading

0 comments on commit cdf28b2

Please sign in to comment.