# google-cloud-storage-standalone

> Google Cloud Storage API Client Library for Node.js. Intended to be used as a standalone product.

Latest version **0.37.0** (published 2016-07-19) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install google-cloud-storage-standalone
pnpm add google-cloud-storage-standalone
yarn add google-cloud-storage-standalone
bun add google-cloud-storage-standalone
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.37.0 |
| Published | 2016-07-19 |
| First published | 2016-07-13 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.12.0 |
| Dependencies | 24 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | Eagerestwolf |
| Maintainers | eagerestwolf |
| Keywords | google apis client, google api client, google apis, google api, google, google cloud platform, google cloud, cloud, google cloud storage, cloud storage, gcs |

## Links

- npm: https://www.npmjs.com/package/google-cloud-storage-standalone
- Repository: https://github.com/eagerestwolf/google-cloud-storage-standalone
- Homepage: https://github.com/eagerestwolf/google-cloud-storage-standalone#readme
- Issues: https://github.com/eagerestwolf/google-cloud-storage-standalone/issues
- npm.io page: https://npm.io/package/google-cloud-storage-standalone

## Dependencies (24)

- [is](https://npm.io/package/is.md) ^3.0.1
- [ent](https://npm.io/package/ent.md) ^2.2.0
- [once](https://npm.io/package/once.md) ^1.3.1
- [async](https://npm.io/package/async.md) ^1.4.2
- [arrify](https://npm.io/package/arrify.md) ^1.0.0
- [extend](https://npm.io/package/extend.md) ^3.0.0
- [pumpify](https://npm.io/package/pumpify.md) ^1.3.3
- [request](https://npm.io/package/request.md) ^2.70.0
- [methmeth](https://npm.io/package/methmeth.md) ^1.0.0
- [propprop](https://npm.io/package/propprop.md) ^0.3.0
- [through2](https://npm.io/package/through2.md) ^2.0.0
- [duplexify](https://npm.io/package/duplexify.md) ^3.2.0
- [array-uniq](https://npm.io/package/array-uniq.md) ^1.0.2
- [mime-types](https://npm.io/package/mime-types.md) ^2.0.8
- [prop-assign](https://npm.io/package/prop-assign.md) ^1.0.0
- [concat-stream](https://npm.io/package/concat-stream.md) ^1.5.0
- [retry-request](https://npm.io/package/retry-request.md) ^1.3.0
- [stream-events](https://npm.io/package/stream-events.md) ^1.0.1
- [google-auto-auth](https://npm.io/package/google-auto-auth.md) ^0.2.4
- [string-format-obj](https://npm.io/package/string-format-obj.md) ^1.0.0
- [create-error-class](https://npm.io/package/create-error-class.md) ^2.0.1
- [split-array-stream](https://npm.io/package/split-array-stream.md) ^1.0.0
- [gcs-resumable-upload](https://npm.io/package/gcs-resumable-upload.md) ^0.7.1
- [hash-stream-validation](https://npm.io/package/hash-stream-validation.md) ^0.2.1

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.37.0 (latest) — 2016-07-19
- 0.36.1 — 2016-07-13
- 0.36.0 — 2016-07-13

## README

# Google Cloud Node.js Client
> Node.js client for [Google Cloud Storage](https://cloud.google.com/storage) service. Intended for use with Meteor.

[![npm](https://img.shields.io/npm/v/google-cloud-storage-standalone.svg)](https://www.npmjs.org/package/google-cloud-storage-standalone)
[![Build Status](https://travis-ci.org/eagerestwolf/google-cloud-storage-standalone.svg?branch=master)](https://travis-ci.org/eagerestwolf/google-cloud-storage-standalone)
[![Dependency Status](https://dependencyci.com/github/eagerestwolf/google-cloud-storage-standalone/badge)](https://dependencyci.com/github/eagerestwolf/google-cloud-storage-standalone)
[![npm](https://img.shields.io/npm/dt/google-cloud-storage-standalone.svg?maxAge=2592000)](https://www.npmjs.org/package/google-cloud-storage-standalone)


This client supports only Google Cloud Storage! If you need more APIs for the Google Cloud Platform, please check out [the offical gcloud project](https://github.com/GoogleCloudPlatform/gcloud-node)

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

## Quick Start

```sh
$ npm install --save google-cloud-storage-standalone
```

## Authentication

With `google-cloud-storage-standalone` it's incredibly easy to get authenticated and start using Google's APIs. You can set your credentials on a global basis as well as on a per-API basis. See each individual API section below to see how you can auth on a per-API-basis. This is useful if you want to use different accounts for different Google Cloud services.

You need a Google Developers service account. To create a service account:

1. Visit the [Google Developers Console][dev-console].
2. Create a new project or click on an existing project.
3. Navigate to  **APIs & auth** > **APIs section** and turn on the following APIs (you may need to enable billing in order to use these services):
  * Google Cloud Datastore API
  * Google Cloud Storage
  * Google Cloud Storage JSON API
4. Navigate to **APIs & auth** >  **Credentials** and then:
  * If you want to use a new service account, click on **Create new Client ID** and select **Service account**. After the account is created, you will be prompted to download the JSON key file that the library uses to authenticate your requests.
  * If you want to generate a new key for an existing service account, click on **Generate new JSON key** and download the JSON key file.

``` js
// Authenticating on a global basis.
var projectId = process.env.GCLOUD_PROJECT; // E.g. 'grape-spaceship-123'

var gcloud = require('gcloud')({
  projectId: projectId,
  keyFilename: '/path/to/keyfile.json'
});

// ...you're good to go! See the next section to get started using the APIs.
```

## Google Cloud Storage

If you need more information for Google Cloud Storage, please refer to following docs
* Visit the [Google Cloud Platform Docs](gcloud-docs)
* Visit the [Google Cloud Platform Docs for Google Storage](gcloud-storage-docs)
* Visit the [Official Google Cloud Stoage Documentation](cloud-storage-docs)

#### Preview

```js
var fs = require('fs');
var gcloud = require('gcloud');

// Authenticating on a per-API-basis. You don't need to do this if you auth on a
// global basis (see Authentication section above).

var gcs = gcloud.storage({
  projectId: 'my-project',
  keyFilename: '/path/to/keyfile.json'
});

// Create a new bucket.
gcs.createBucket('my-new-bucket', function(err, bucket) {
  if (!err) {
    // "my-new-bucket" was successfully created.
  }
});

// Reference an existing bucket.
var bucket = gcs.bucket('my-existing-bucket');

// Upload a local file to a new file to be created in your bucket.
bucket.upload('/photos/zoo/zebra.jpg', function(err, file) {
  if (!err) {
    // "zebra.jpg" is now in your bucket.
  }
});

// Download a file from your bucket.
bucket.file('giraffe.jpg').download({
  destination: '/photos/zoo/giraffe.jpg'
}, function(err) {});

// Streams are also supported for reading and writing files.
var remoteReadStream = bucket.file('giraffe.jpg').createReadStream();
var localWriteStream = fs.createWriteStream('/photos/zoo/giraffe.jpg');
remoteReadStream.pipe(localWriteStream);

var localReadStream = fs.createReadStream('/photos/zoo/zebra.jpg');
var remoteWriteStream = bucket.file('zebra.jpg').createWriteStream();
localReadStream.pipe(remoteWriteStream);
```

## Contributing

Contributions to this library are always welcome and highly encouraged.

See [CONTRIBUTING](CONTRIBUTING.md) for more information on how to get started.

## License

Apache 2.0 - See [COPYING](COPYING) for more information.

[gcloud-docs]: https://googlecloudplatform.github.io/gcloud-node/#/docs
[gcloud-storage-docs]: https://googlecloudplatform.github.io/gcloud-node/#/docs/storage

[dev-console]: https://console.developers.google.com/project

[googleapis]: https://github.com/google/google-api-nodejs-client

[cloud-storage-docs]: https://cloud.google.com/storage/docs/overview

---
_Source: https://npm.io/package/google-cloud-storage-standalone · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
