GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: add .repo-metadata.json, quickstart, and generate README (#177) · googleapis/google-cloud-node@ac0248d

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • packages/google-cloud-redis
    • .gitignore
    • .repo-metadata.json
    • README.md
    • samples
      • README.md
      • quickstart.js
    • synth.metadata
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎packages/google-cloud-redis/.gitignore‎

Copy file name to clipboardExpand all lines: packages/google-cloud-redis/.gitignore
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ system-test/*key.json
1212
google-cloud-logging-winston-*.tgz
1313
google-cloud-logging-bunyan-*.tgz
1414
package-lock.json
15+
__pycache__
Collapse file

‎packages/google-cloud-redis/.repo-metadata.json‎

Copy file name to clipboard
+14Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"name": "redis",
3+
"name_pretty": "Cloud Redis",
4+
"product_documentation": "https://cloud.google.com/memorystore/docs/redis/",
5+
"client_documentation": "https://cloud.google.com/nodejs/docs/reference/redis/latest/",
6+
"issue_tracker": "https://issuetracker.google.com/savedsearches/5169231",
7+
"release_level": "alpha",
8+
"language": "nodejs",
9+
"repo": "googleapis/nodejs-redis",
10+
"distribution_name": "@google-cloud/redis",
11+
"api_id": "redis.googleapis.com",
12+
"requires_billing": true
13+
}
14+
Collapse file

‎packages/google-cloud-redis/README.md‎

Copy file name to clipboard
+55-19Lines changed: 55 additions & 19 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
[//]: # "This README.md file is auto-generated, all changes to this file will be lost."
2-
[//]: # "To regenerate it, use `npm run generate-scaffolding`."
2+
[//]: # "To regenerate it, use `python -m synthtool`."
33
<img src="https://avatars2.githubusercontent.com/u/2810941?v=3&s=96" alt="Google Cloud Platform logo" title="Google Cloud Platform" align="right" height="96" width="96"/>
44

55
# [Cloud Redis: Node.js Client](https://github.com/googleapis/nodejs-redis)
66

7-
[![release level](https://img.shields.io/badge/release%20level-alpha-orange.svg?style&#x3D;flat)](https://cloud.google.com/terms/launch-stages)
7+
[![release level](https://img.shields.io/badge/release%20level-alpha-orange.svg?style=flat)](https://cloud.google.com/terms/launch-stages)
88
[![npm version](https://img.shields.io/npm/v/@google-cloud/redis.svg)](https://www.npmjs.org/package/@google-cloud/redis)
99
[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-redis/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-redis)
1010

11-
> Node.js idiomatic client for [Cloud Redis][product-docs].
1211

13-
Client for Google Cloud Redis
12+
13+
14+
Google Cloud Memorystore for Redis API client for Node.js
1415

1516

1617
* [Cloud Redis Node.js Client API Reference][client-docs]
17-
* [github.com/googleapis/nodejs-redis](https://github.com/googleapis/nodejs-redis)
1818
* [Cloud Redis Documentation][product-docs]
19+
* [github.com/googleapis/nodejs-redis](https://github.com/googleapis/nodejs-redis)
1920

2021
Read more about the client libraries for Cloud APIs, including the older
2122
Google APIs Client Libraries, in [Client Libraries Explained][explained].
@@ -24,10 +25,12 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained].
2425

2526
**Table of contents:**
2627

28+
2729
* [Quickstart](#quickstart)
2830
* [Before you begin](#before-you-begin)
2931
* [Installing the client library](#installing-the-client-library)
3032
* [Using the client library](#using-the-client-library)
33+
* [Samples](#samples)
3134
* [Versioning](#versioning)
3235
* [Contributing](#contributing)
3336
* [License](#license)
@@ -36,25 +39,50 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained].
3639

3740
### Before you begin
3841

39-
1. Select or create a Cloud Platform project.
42+
1. [Select or create a Cloud Platform project][projects].
43+
1. [Enable billing for your project][billing].
44+
1. [Enable the Cloud Redis API][enable_api].
45+
1. [Set up authentication with a service account][auth] so you can access the
46+
API from your local workstation.
4047

41-
[Go to the projects page][projects]
48+
### Installing the client library
4249

43-
1. Enable billing for your project.
50+
```bash
51+
npm install @google-cloud/redis
52+
```
4453

45-
[Enable billing][billing]
4654

47-
1. [Set up authentication with a service account][auth] so you can access the
48-
API from your local workstation.
55+
### Using the client library
4956

50-
[projects]: https://console.cloud.google.com/project
51-
[billing]: https://support.google.com/cloud/answer/6293499#enable-billing
52-
[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=
53-
[auth]: https://cloud.google.com/docs/authentication/getting-started
57+
```javascript
58+
/**
59+
* List instances in a given location.
60+
* @param {string} project.
61+
* @param {string} location, e.g., us-east-1.
62+
*/
63+
async function main(projectId, location) {
64+
const {CloudRedisClient} = require('@google-cloud/redis');
65+
const client = new CloudRedisClient();
66+
const formattedParent = client.locationPath(projectId, location);
67+
const request = {
68+
parent: formattedParent,
69+
};
70+
const resp = (await client.listInstances(request))[0];
71+
console.info(resp);
72+
}
5473

55-
### Installing the client library
74+
```
5675

57-
npm install --save @google-cloud/redis
76+
77+
78+
## Samples
79+
80+
Samples are in the [`samples/`](https://github.com/googleapis/nodejs-redis/tree/master/samples) directory. The samples' `README.md`
81+
has instructions for running the samples.
82+
83+
| Sample | Source Code | Try it |
84+
| --------------------------- | --------------------------------- | ------ |
85+
| Quickstart | [source code](https://github.com/googleapis/nodejs-redis/blob/master/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-redis&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) |
5886

5987

6088

@@ -65,10 +93,15 @@ also contains samples.
6593

6694
This library follows [Semantic Versioning](http://semver.org/).
6795

96+
97+
98+
6899
This library is considered to be in **alpha**. This means it is still a
69100
work-in-progress and under active development. Any release is subject to
70101
backwards-incompatible changes at any time.
71102

103+
104+
72105
More Information: [Google Cloud Platform Launch Stages][launch_stages]
73106

74107
[launch_stages]: https://cloud.google.com/terms/launch-stages
@@ -84,6 +117,9 @@ Apache Version 2.0
84117
See [LICENSE](https://github.com/googleapis/nodejs-redis/blob/master/LICENSE)
85118

86119
[client-docs]: https://cloud.google.com/nodejs/docs/reference/redis/latest/
87-
[product-docs]: https://cloud.google.com/memorystore/docs
120+
[product-docs]: https://cloud.google.com/memorystore/docs/redis/
88121
[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png
89-
122+
[projects]: https://console.cloud.google.com/project
123+
[billing]: https://support.google.com/cloud/answer/6293499#enable-billing
124+
[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=redis.googleapis.com
125+
[auth]: https://cloud.google.com/docs/authentication/getting-started
Collapse file

‎packages/google-cloud-redis/samples/README.md‎

Copy file name to clipboard
+44Lines changed: 44 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
[//]: # "This README.md file is auto-generated, all changes to this file will be lost."
2+
[//]: # "To regenerate it, use `python -m synthtool`."
3+
<img src="https://avatars2.githubusercontent.com/u/2810941?v=3&s=96" alt="Google Cloud Platform logo" title="Google Cloud Platform" align="right" height="96" width="96"/>
4+
5+
# [Cloud Redis: Node.js Samples](https://github.com/googleapis/nodejs-redis)
6+
7+
[![Open in Cloud Shell][shell_img]][shell_link]
8+
9+
10+
11+
## Table of Contents
12+
13+
* [Before you begin](#before-you-begin)
14+
* [Samples](#samples)
15+
* [Quickstart](#quickstart)
16+
17+
## Before you begin
18+
19+
Before running the samples, make sure you've followed the steps outlined in
20+
[Using the client library](https://github.com/googleapis/nodejs-redis#using-the-client-library).
21+
22+
## Samples
23+
24+
25+
26+
### Quickstart
27+
28+
View the [source code](https://github.com/googleapis/nodejs-redis/blob/master/samples/quickstart.js).
29+
30+
[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-redis&page=editor&open_in_editor=samples/quickstart.js,samples/README.md)
31+
32+
__Usage:__
33+
34+
35+
`node quickstart.js`
36+
37+
38+
39+
40+
41+
42+
[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png
43+
[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-redis&page=editor&open_in_editor=samples/README.md
44+
[product-docs]: https://cloud.google.com/memorystore/docs/redis/
Collapse file

‎packages/google-cloud-redis/samples/quickstart.js‎

Copy file name to clipboard
+38-14Lines changed: 38 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,39 @@
1-
// Copyright 2018 Google LLC
2-
//
3-
// Licensed under the Apache License, Version 2.0 (the "License");
4-
// you may not use this file except in compliance with the License.
5-
// You may obtain a copy of the License at
6-
//
7-
// https://www.apache.org/licenses/LICENSE-2.0
8-
//
9-
// Unless required by applicable law or agreed to in writing, software
10-
// distributed under the License is distributed on an "AS IS" BASIS,
11-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
// See the License for the specific language governing permissions and
13-
// limitations under the License.
1+
/**
2+
* Copyright 2019, Google, Inc.
3+
* Licensed under the Apache License, Version 2.0 (the "License");
4+
* you may not use this file except in compliance with the License.
5+
* You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software
10+
* distributed under the License is distributed on an "AS IS" BASIS,
11+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
* See the License for the specific language governing permissions and
13+
* limitations under the License.
14+
*/
1415

15-
console.warn('no samples available 😐');
16+
'use strict';
17+
18+
// [START redis_quickstart]
19+
/**
20+
* List instances in a given location.
21+
* @param {string} project.
22+
* @param {string} location, e.g., us-east-1.
23+
*/
24+
async function main(projectId, location) {
25+
const {CloudRedisClient} = require('@google-cloud/redis');
26+
const client = new CloudRedisClient();
27+
const formattedParent = client.locationPath(projectId, location);
28+
const request = {
29+
parent: formattedParent,
30+
};
31+
const resp = (await client.listInstances(request))[0];
32+
console.info(resp);
33+
}
34+
// [END redis_quickstart]
35+
36+
main(...process.argv.slice(2)).catch(err => {
37+
console.error(err);
38+
process.exitCode = 1;
39+
});
Collapse file

‎packages/google-cloud-redis/synth.metadata‎

Copy file name to clipboardExpand all lines: packages/google-cloud-redis/synth.metadata
+6-6Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
{
2-
"updateTime": "2019-05-21T11:22:45.313794Z",
2+
"updateTime": "2019-06-01T09:03:35.220606Z",
33
"sources": [
44
{
55
"generator": {
66
"name": "artman",
7-
"version": "0.20.0",
8-
"dockerImage": "googleapis/artman@sha256:3246adac900f4bdbd62920e80de2e5877380e44036b3feae13667ec255ebf5ec"
7+
"version": "0.22.0",
8+
"dockerImage": "googleapis/artman@sha256:72f6287a42490bfe1609aed491f29411af21df3f744199fe8bb8d276c1fdf419"
99
}
1010
},
1111
{
1212
"git": {
1313
"name": "googleapis",
1414
"remote": "https://github.com/googleapis/googleapis.git",
15-
"sha": "32a10f69e2c9ce15bba13ab1ff928bacebb25160",
16-
"internalRef": "249058354"
15+
"sha": "a8ee1416f4c588f2ab92da72e7c1f588c784d3e6",
16+
"internalRef": "250996044"
1717
}
1818
},
1919
{
2020
"template": {
2121
"name": "node_library",
2222
"origin": "synthtool.gcp",
23-
"version": "2019.5.2"
23+
"version": "2019.4.10"
2424
}
2525
}
2626
],

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.