diff --git a/README.md b/README.md index 65f88a20f26..ef62df6049d 100644 --- a/README.md +++ b/README.md @@ -393,15 +393,15 @@ var name = 'ubuntu-http'; zone.createVM(name, { os: 'ubuntu' }, function(err, vm, operation) { // `operation` lets you check the status of long-running tasks. - operation.on('complete', function(err, metadata) { - if (!err) { + operation + .on('error', function(err) {}) + .on('running', function(metadata) {}) + .on('complete', function(metadata) { // Virtual machine created! - } - }); + }); }); ``` - ## Google Prediction API - [API Documentation][gcloud-prediction-docs]