Skip to content

Commit aa5f3a1

Browse files
committed
chore(examples): remove examples
outdated
1 parent fcd563a commit aa5f3a1

Some content is hidden

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

57 files changed

+5
-10705
lines changed

.eslintignore

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
11
node_modules/
22
dist/
3-
doc/
4-
examples/static/watson-speech.js
5-
examples/static/scripts/
6-
examples/node_modules/
7-
examples/static/webpack-bundle.js
3+
doc/

.gitignore

-4
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@ test/resources/tts-auth.json
88
doc/
99
*-auth.json
1010
.env
11-
examples/static/bower_components/
12-
examples/static/webpack-bundle.js
13-
examples/static/scripts/
14-
examples/node_modules/
1511
dist/*.js
1612
dist/*.map
1713
gh-pages/

.npmignore

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
doc/
2-
examples/
32
jsdoc/
43
test/
54
.editorconfig

.travis.yml

-6
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,6 @@ env:
2222
- BX_SPACE=sdks
2323
before_deploy: npm install -g bx-blue-green
2424
deploy:
25-
- provider: script
26-
skip_cleanup: true
27-
script: cd examples/ && bx-blue-green-travis
28-
on:
29-
branch: master
30-
repo: watson-developer-cloud/speech-javascript-sdk
3125
- provider: script
3226
skip_cleanup: true
3327
script: npx semantic-release@15

README.md

+4-15
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Allows you to easily add voice recognition and synthesis to any web app with min
1010

1111
This library is primarily intended for use in web browsers. Check out [ibm-watson](https://www.npmjs.com/package/ibm-watson) to use Watson services (speech and others) from Node.js.
1212

13-
However, a **server-side component is required to generate auth tokens**. The `examples/` folder includes example Node.js and Python servers, and SDKs are available for [Node.js](https://github.com/watson-developer-cloud/node-sdk#authorization), [Java](https://github.com/watson-developer-cloud/java-sdk), [Python](https://github.com/watson-developer-cloud/python-sdk/blob/master/examples/authorization_v1.py), and there is also a [REST API](https://cloud.ibm.com/docs/services/watson?topic=watson-gs-tokens-watson-tokens).
13+
However, a **server-side component is required to generate auth tokens**. SDKs are available for [Node.js](https://github.com/watson-developer-cloud/node-sdk#authorization), [Java](https://github.com/watson-developer-cloud/java-sdk), [Python](https://github.com/watson-developer-cloud/python-sdk/blob/master/examples/authorization_v1.py), which can be used with a server-side application.
1414

1515
### Installation - standalone
1616

@@ -37,11 +37,11 @@ var recognizeMic = require('watson-speech/speech-to-text/recognize-microphone');
3737

3838
## Using with IAM
3939

40-
This SDK _CAN_ be used in the browser with services that use IAM for authentication. This does require a server-side component - an endpoint used to retrieve the token. An example can be found [here](https://github.com/watson-developer-cloud/speech-javascript-sdk/blob/master/examples/server.js#L92).
40+
This SDK _CAN_ be used in the browser with services that use IAM for authentication. This does require a server-side component - an endpoint used to retrieve the token.
4141

42-
In a local environment you should set only the `TEXT_TO_SPEECH_IAM_APIKEY` and `SPEECH_TO_TEXT_IAM_APIKEY` in your `.env` file, see example file [here](https://github.com/watson-developer-cloud/speech-javascript-sdk/blob/master/examples/.env.example).
42+
In a local environment you should set only the `TEXT_TO_SPEECH_IAM_APIKEY` and `SPEECH_TO_TEXT_IAM_APIKEY` in your `.env` file.
4343

44-
Once that is set up, the token can be used in your SDK request with the parameter `access_token`. See [this example](https://github.com/watson-developer-cloud/speech-javascript-sdk/blob/master/examples/static/microphone-streaming.html#L36).
44+
Once that is set up, the token can be used in your SDK request with the parameter `access_token`.
4545

4646
## Using with Angular
4747

@@ -64,17 +64,6 @@ See [CHANGELOG.md](CHANGELOG.md) for a complete list of changes.
6464

6565
Unfortunately, there is no way to set or get the global transaction id provided by the initial websocket handshake with the Speech service. This is due to limitations from the W3C Websocket API for browser. It is possible; however, to grab the `X-Global-Transaction-Id` header through a browser's dev tool "Network" tab. After making a call to the service, look for a request to the `v1/recognize` endpoint which should return a 101 code. The response headers from that request will contain the `X-Global-Transaction-Id` header.
6666

67-
### Use examples for development
68-
69-
The provided examples can be used to test developmental code in action:
70-
71-
- `cd examples/`
72-
- `npm run dev`
73-
74-
This will build the local code, move the new bundle into the `examples/` directory, and start a new server at `localhost:3000` where the examples will be running.
75-
76-
Note: This requires valid service credentials.
77-
7867
### Testing
7968

8069
The test suite is broken up into offline unit tests and integration tests that test against actual service instances.

docs/README.md

-7
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,4 @@
22

33
The basic API is outlined below, see complete API docs at http://watson-developer-cloud.github.io/speech-javascript-sdk/master/
44

5-
See several basic examples at http://watson-speech.mybluemix.net/ ([source](https://github.com/watson-developer-cloud/speech-javascript-sdk/tree/master/examples/))
6-
7-
See a more advanced example at https://speech-to-text-demo.mybluemix.net/
8-
95
All API methods require an auth token that must be [generated server-side](https://github.com/watson-developer-cloud/node-sdk#authorization).
10-
(See https://github.com/watson-developer-cloud/speech-javascript-sdk/tree/master/examples/ for a couple of basic examples in Node.js and Python.)
11-
12-
_NOTE_: The `token` parameter only works for CF instances of services. For RC services using IAM for authentication, the `accessToken` parameter must be used.

examples/.cfignore

-2
This file was deleted.

examples/.env.example

-9
This file was deleted.

examples/.eslintrc.js

-10
This file was deleted.

examples/keys/localhost.cert

-11
This file was deleted.

examples/keys/localhost.csr

-10
This file was deleted.

examples/keys/localhost.pem

-15
This file was deleted.

examples/manifest.yml

-19
This file was deleted.

0 commit comments

Comments
 (0)