Skip to content

Commit

Permalink
feat(discov1): remove discoV1
Browse files Browse the repository at this point in the history
BREAKING CHANGE: DiscoveryV1 functionality has been removed
  • Loading branch information
apaparazzi0329 committed Dec 5, 2024
1 parent 3fa8b85 commit 2d64d0d
Show file tree
Hide file tree
Showing 392 changed files with 2 additions and 47,610 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,13 @@ jobs:
ASSISTANT_WORKSPACE_ID: ${{ secrets.WA_WORKSPACE_ID }}
ASSISTANT_ASSISTANT_ID: ${{ secrets.WA_ASSISTANT_ID }}
ASSISTANT_URL: "https://api.us-south.assistant.watson.cloud.ibm.com"
DISCOVERY_APIKEY: ${{ secrets.D1_APIKEY }}
DISCOVERY_ENVIRONMENT_ID: ${{ secrets.D1_ENVIRONMENT_ID }}
DISCOVERY_COLLECTION_ID: ${{ secrets.D1_COLLECTION_ID }}
DISCOVERY_URL: "https://api.us-south.discovery.watson.cloud.ibm.com"
DISCOVERY_V2_APIKEY: ${{ secrets.D2_APIKEY }}
DISCOVERY_V2_PROJECT_ID: ${{ secrets.D2_PROJECT_ID }}
DISCOVERY_V2_COLLECTION_ID: ${{ secrets.D2_COLLECTION_ID }}
DISCOVERY_V2_URL: "https://api.us-south.discovery.watson.cloud.ibm.com"
run: |
mvn test -Dtest=v1/AssistantServiceIT -DfailIfNoTests=false -pl assistant,common $MVN_ARGS
mvn test -Dtest=v2/AssistantServiceIT -DfailIfNoTests=false -pl assistant,common $MVN_ARGS
mvn test -Dtest=v1/DiscoveryServiceIT -DfailIfNoTests=false -pl discovery,common $MVN_ARGS
mvn test -Dtest=v2/DiscoveryIT -DfailIfNoTests=false -pl discovery,common $MVN_ARGS
mvn test -Dtest=LanguageTranslatorIT -DfailIfNoTests=false -pl language-translator,common $MVN_ARGS
mvn test -Dtest=NaturalLanguageUnderstandingIT -DfailIfNoTests=false -pl natural-language-understanding,common $MVN_ARGS
Expand Down
18 changes: 2 additions & 16 deletions discovery/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,9 @@

## Usage

This SDK supports both the Discovery v1 and v2 APIs.
This SDK supports the Discovery v2 APIs.

Otherwise, the APIs are fairly similar, offering the ability to manage collections of documents and query them for insights. You can learn more about the Discovery service [here](https://cloud.ibm.com/docs/discovery?topic=discovery-gs-api).

### Using Discovery v1

```java
// Make sure to use the Discovery v1 import!
Authenticator authenticator = new IamAuthenticator("<iam_api_key>");
Discovery discovery = new Discovery("2019-04-30", authenticator);

//Build an empty query on an existing environment/collection
String environmentId = "<environment_id>";
String collectionId = "<collection_id>";
QueryOptions queryOptions = new QueryOptions.Builder(environmentId, collectionId).build();
QueryResponse queryResponse = discovery.query(queryOptions).execute().getResult();
```
Otherwise, the APIs are fairly similar, offering the ability to manage collections of documents and query them for insights. You can learn more about the Discovery service [here](https://cloud.ibm.com/apidocs/discovery-data).

### Using Discovery v2

Expand Down
2,943 changes: 0 additions & 2,943 deletions discovery/src/main/java/com/ibm/watson/discovery/v1/Discovery.java

This file was deleted.

This file was deleted.

Loading

0 comments on commit 2d64d0d

Please sign in to comment.