Skip to content

Commit

Permalink
prediction API is disabled (#2819)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-fenster authored and stephenplusplus committed May 3, 2018
1 parent 84981c3 commit 32e4a18
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 149 deletions.
67 changes: 0 additions & 67 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@ This client supports the following Google Cloud Platform services at an [Alpha](
* [Google Stackdriver Error Reporting](https://github.com/googleapis/nodejs-error-reporting) (Alpha)
* [Google Stackdriver Trace](#google-stackdriver-trace-alpha) (Alpha)

The following client libraries are **deprecated** due to the underlying API also being deprecated:

* [Google Prediction API](https://github.com/googleapis/nodejs-prediction) (Deprecated)

If you need support for other Google APIs, check out the [Google Node.js API Client library][googleapis].


Expand Down Expand Up @@ -138,7 +134,6 @@ If you are not running this client on Google Cloud Platform, you need a Google D
* Google Cloud Translation API
* Google Cloud Vision API
* Google Compute Engine API
* Prediction API
* Stackdriver Logging API
4. Navigate to **APIs & auth** > **Credentials** and then:
* If you want to use a new service account key, click on **Create credentials** and select **Service account key**. After the account key is created, you will be prompted to download the JSON key file that the library uses to authenticate your requests.
Expand Down Expand Up @@ -1069,65 +1064,6 @@ zone.createVM(name, { os: 'ubuntu' }, function(err, vm, operation) {
});
```


## Google Prediction API (Alpha)

- [API Documentation][gcloud-prediction-docs]
- [Official Documentation][cloud-prediction-docs]

#### Using the Prediction API module

```
$ npm install --save @google-cloud/prediction
```

```js
var prediction = require('@google-cloud/prediction');
```

#### Authentication

See [Authentication](#authentication).

#### Preview

```js
var predictionClient = prediction({
projectId: 'grape-spaceship-123',
keyFilename: '/path/to/keyfile.json'
});

// Get all of the trained models in your project.
predictionClient.getModels(function(err, models) {
if (!err) {
// `models` is an array of Model objects.
}
});

// Reference an existing trained model.
var model = predictionClient.model('my-existing-model');

// Train a model.
model.train('english', 'Hello from your friends at Google!', function(err) {});

// Query a model.
model.query('Hello', function(err, results) {
if (!err) {
// results.winner == 'english'
// results.scores == [
// {
// label: 'english',
// score: 1
// },
// {
// label: 'spanish',
// score: 0
// }
// ]
}
});
```

## Google Stackdriver Debugger (Alpha)

- [GitHub Repo][stackdriver-debug-nodejs-repo]
Expand Down Expand Up @@ -1238,7 +1174,6 @@ Apache 2.0 - See [LICENSE][license] for more information.
[gcloud-dns-docs]: https://googlecloudplatform.github.io/google-cloud-node/#/docs/dns
[gcloud-language-docs]: https://googlecloudplatform.github.io/google-cloud-node/#/docs/language
[gcloud-logging-docs]: https://googlecloudplatform.github.io/google-cloud-node/#/docs/logging
[gcloud-prediction-docs]: https://googlecloudplatform.github.io/google-cloud-node/#/docs/prediction
[gcloud-monitoring-docs]: https://googlecloudplatform.github.io/google-cloud-node/#/docs/monitoring
[gcloud-pubsub-docs]: https://googlecloudplatform.github.io/google-cloud-node/#/docs/pubsub
[gcloud-resource-docs]: https://googlecloudplatform.github.io/google-cloud-node/#/docs/resource
Expand Down Expand Up @@ -1285,8 +1220,6 @@ Apache 2.0 - See [LICENSE][license] for more information.

[cloud-logging-docs]: https://cloud.google.com/logging/docs

[cloud-prediction-docs]: https://cloud.google.com/prediction/docs

[cloud-pubsub-docs]: https://cloud.google.com/pubsub/docs

[cloud-resource-docs]: https://cloud.google.com/resource-manager
Expand Down
18 changes: 1 addition & 17 deletions docs/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -268,22 +268,6 @@
"master"
]
},
{
"id": "prediction",
"name": "@google-cloud/prediction",
"defaultService": "prediction",
"versions": [
"0.6.1",
"0.6.0",
"0.4.0",
"0.3.1",
"0.3.0",
"0.2.0",
"0.1.2",
"0.1.1",
"master"
]
},
{
"id": "pubsub",
"name": "@google-cloud/pubsub",
Expand Down Expand Up @@ -427,4 +411,4 @@
"title": "npm",
"href": "https://www.npmjs.com/package/gcloud"
}
}
}
16 changes: 0 additions & 16 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -268,22 +268,6 @@
"master"
]
},
{
"id": "prediction",
"name": "@google-cloud/prediction",
"defaultService": "prediction",
"versions": [
"0.6.1",
"0.6.0",
"0.4.0",
"0.3.1",
"0.3.0",
"0.2.0",
"0.1.2",
"0.1.1",
"master"
]
},
{
"id": "pubsub",
"name": "@google-cloud/pubsub",
Expand Down
3 changes: 0 additions & 3 deletions packages/google-cloud/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,6 @@
"google appengine",
"appengine",
"gae",
"google prediction",
"prediction",
"google translate",
"translate",
"google cloud logging",
Expand Down Expand Up @@ -119,7 +117,6 @@
"@google-cloud/language": "^0.12.1",
"@google-cloud/logging": "^1.0.0",
"@google-cloud/monitoring": "^0.3.0",
"@google-cloud/prediction": "^0.6.0",
"@google-cloud/pubsub": "^0.14.3",
"@google-cloud/resource": "^0.7.0",
"@google-cloud/spanner": "^0.7.1",
Expand Down
27 changes: 0 additions & 27 deletions packages/google-cloud/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,33 +235,6 @@ var apis = {
*/
monitoring: require('@google-cloud/monitoring'),

/**
* The [Google Prediction API](https://cloud.google.com/prediction/docs/getting-started)
* provides pattern-matching and machine learning capabilities. Given a set of
* data examples to train against, you can create applications that can
* perform the following tasks:
*
* - Given a user's past viewing habits, predict what other movies or
* products a user might like.
* - Categorize emails as spam or non-spam.
* - Analyze posted comments about your product to determine whether they
* have a positive or negative tone.
* - Guess how much a user might spend on a given day, given his spending
* history.
*
* @type {module:prediction}
*
* @return {module:prediction}
*
* @example
* var gcloud = require('google-cloud');
* var prediction = gcloud.prediction({
* projectId: 'grape-spaceship-123',
* keyFilename: '/path/to/keyfile.json'
* });
*/
prediction: require('@google-cloud/prediction'),

/**
* [Cloud Pub/Sub](https://developers.google.com/pubsub/overview) is a
* reliable, many-to-many, asynchronous messaging service from Cloud
Expand Down
17 changes: 1 addition & 16 deletions packages/google-cloud/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ var FakeFirestore = createFakeApi();
var FakeLanguage = createFakeApi();
var FakeLogging = createFakeApi();
var FakeMonitoring = createFakeApi();
var FakePrediction = createFakeApi();
var FakePubSub = createFakeApi();
var FakeResource = createFakeApi();
var FakeSpanner = createFakeApi();
Expand All @@ -67,7 +66,6 @@ describe('gcloud', function() {
'@google-cloud/language': FakeLanguage,
'@google-cloud/logging': FakeLogging,
'@google-cloud/monitoring': FakeMonitoring,
'@google-cloud/prediction': FakePrediction,
'@google-cloud/pubsub': FakePubSub,
'@google-cloud/resource': FakeResource,
'@google-cloud/spanner': FakeSpanner,
Expand Down Expand Up @@ -123,10 +121,6 @@ describe('gcloud', function() {
assert.strictEqual(gcloud.monitoring, FakeMonitoring);
});

it('should export static prediction', function() {
assert.strictEqual(gcloud.prediction, FakePrediction);
});

it('should export static pubsub', function() {
assert.strictEqual(gcloud.pubsub, FakePubSub);
});
Expand Down Expand Up @@ -280,15 +274,6 @@ describe('gcloud', function() {
});
});

describe('prediction', function() {
it('should create a new Prediction', function() {
var prediction = localGcloud.prediction(options);

assert(prediction instanceof FakePrediction);
assert.strictEqual(prediction.calledWith_[0], options);
});
});

describe('pubsub', function() {
it('should create a new PubSub', function() {
var pubsub = localGcloud.pubsub(options);
Expand All @@ -299,7 +284,7 @@ describe('gcloud', function() {
});

describe('resource', function() {
it('should create a new Prediction', function() {
it('should create a new Resource', function() {
var resource = localGcloud.resource(options);

assert(resource instanceof FakeResource);
Expand Down
3 changes: 0 additions & 3 deletions scripts/docs/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,6 @@ module.exports = {
monitoring: {
title: 'Cloud Monitoring'
},
prediction: {
title: 'Prediction API'
},
pubsub: {
title: 'Cloud Pub/Sub'
},
Expand Down

0 comments on commit 32e4a18

Please sign in to comment.