Skip to content

Conversation

@callmehiphop
Copy link
Contributor

@callmehiphop callmehiphop commented Oct 17, 2016

Breaking changes ahead! ⚠️

This adds Promise support for the @google-cloud/storage module!

Summary of changes

The following methods previously returned a stream in the event that the callback parameter was omitted. This functionality has since moved to a different method entirely.

  • Storage#getBuckets -> Storage#getBucketsStream
  • Bucket#getFiles -> Bucket#getFilesStream

Each callback accepting change has also been updated to return a Promise instance in the event that thecallback was omitted.

@callmehiphop callmehiphop added api: storage Issues related to the Cloud Storage API. don't merge labels Oct 17, 2016
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Oct 17, 2016
@callmehiphop callmehiphop mentioned this pull request Oct 17, 2016
48 tasks
// Promises are also supported by omitting callbacks.
bucket.upload('/photos/zoo/zebra.jpg').then(function(data) {
var file = data[0];
});

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 9c59736 on callmehiphop:promise-storage-support into 4374e6f on GoogleCloudPlatform:master.

var file = data[0];
});

// It's also possible to integrate with third-party Promise libraries.

This comment was marked as spam.

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: storage Issues related to the Cloud Storage API. cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants