Skip to content

Commit

Permalink
fix: Renaming region tags to not conflict with documentation snippets (
Browse files Browse the repository at this point in the history
…googleapis#834)

* Moving API reference snippets and renaming region tags to not conflict with documentation snippets

* fix mismatched tags, fix mixed backups files

* fix quickstart tag

* linkenator fix
  • Loading branch information
billyjacobson authored Jan 7, 2021
1 parent df32076 commit 5d3e8f7
Show file tree
Hide file tree
Showing 25 changed files with 307 additions and 301 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,12 @@ Samples are in the [`samples/`](https://github.com/googleapis/nodejs-bigtable/tr

| Sample | Source Code | Try it |
| --------------------------- | --------------------------------- | ------ |
| Backups.create | [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/backups.create.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/backups.create.js,samples/README.md) |
| Backups.delete | [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/backups.delete.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/backups.delete.js,samples/README.md) |
| Backups.get | [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/backups.get.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/backups.get.js,samples/README.md) |
| Backups.list | [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/backups.list.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/backups.list.js,samples/README.md) |
| Backups.restore | [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/backups.restore.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/backups.restore.js,samples/README.md) |
| Backups.update | [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/backups.update.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/backups.update.js,samples/README.md) |
| Backups.create | [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/api-reference-doc-snippets/backups.create.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/api-reference-doc-snippets/backups.create.js,samples/README.md) |
| Backups.delete | [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/api-reference-doc-snippets/backups.delete.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/api-reference-doc-snippets/backups.delete.js,samples/README.md) |
| Backups.get | [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/api-reference-doc-snippets/backups.get.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/api-reference-doc-snippets/backups.get.js,samples/README.md) |
| Backups.list | [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/api-reference-doc-snippets/backups.list.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/api-reference-doc-snippets/backups.list.js,samples/README.md) |
| Backups.restore | [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/api-reference-doc-snippets/backups.restore.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/api-reference-doc-snippets/backups.restore.js,samples/README.md) |
| Backups.update | [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/api-reference-doc-snippets/backups.update.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/api-reference-doc-snippets/backups.update.js,samples/README.md) |
| Filter Snippets | [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/filterSnippets.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/filterSnippets.js,samples/README.md) |
| Instances | [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/instances.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/instances.js,samples/README.md) |
| Quickstart | [source code](https://github.com/googleapis/nodejs-bigtable/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-bigtable&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) |
Expand Down
8 changes: 7 additions & 1 deletion linkinator.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@
"skip": [
"https://codecov.io/gh/googleapis/",
"www.googleapis.com",
"img.shields.io"
"img.shields.io",
"https://github.com/googleapis/nodejs-bigtable/blob/master/samples/api-reference-doc-snippets/backups.create.js",
"https://github.com/googleapis/nodejs-bigtable/blob/master/samples/api-reference-doc-snippets/backups.delete.js",
"https://github.com/googleapis/nodejs-bigtable/blob/master/samples/api-reference-doc-snippets/backups.get.js",
"https://github.com/googleapis/nodejs-bigtable/blob/master/samples/api-reference-doc-snippets/backups.list.js",
"https://github.com/googleapis/nodejs-bigtable/blob/master/samples/api-reference-doc-snippets/backups.restore.js",
"https://github.com/googleapis/nodejs-bigtable/blob/master/samples/api-reference-doc-snippets/backups.update.js"
],
"silent": true,
"concurrency": 10
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"lint": "gts check",
"prepare": "npm run compile",
"samples-test": "cd samples/ && npm link ../ && npm install && npm test && cd ../",
"snippet-test": "mocha samples/document-snippets/tests/*.js --timeout 600000",
"snippet-test": "mocha samples/api-reference-doc-snippets/tests/*.js --timeout 600000",
"presystem-test": "npm run compile",
"system-test": "mocha build/system-test --timeout 600000",
"pretest": "npm run compile",
Expand Down
36 changes: 18 additions & 18 deletions samples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ Before running the samples, make sure you've followed the steps outlined in

### Backups.create

View the [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/backups.create.js).
View the [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/api-reference-doc-snippets/backups.create.js).

[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/backups.create.js,samples/README.md)
[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/api-reference-doc-snippets/backups.create.js,samples/README.md)

__Usage:__


`node samples/backups.create.js`
`node samples/api-reference-doc-snippets/backups.create.js`


-----
Expand All @@ -62,14 +62,14 @@ __Usage:__

### Backups.delete

View the [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/backups.delete.js).
View the [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/api-reference-doc-snippets/backups.delete.js).

[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/backups.delete.js,samples/README.md)
[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/api-reference-doc-snippets/backups.delete.js,samples/README.md)

__Usage:__


`node samples/backups.delete.js`
`node samples/api-reference-doc-snippets/backups.delete.js`


-----
Expand All @@ -79,14 +79,14 @@ __Usage:__

### Backups.get

View the [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/backups.get.js).
View the [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/api-reference-doc-snippets/backups.get.js).

[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/backups.get.js,samples/README.md)
[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/api-reference-doc-snippets/backups.get.js,samples/README.md)

__Usage:__


`node samples/backups.get.js`
`node samples/api-reference-doc-snippets/backups.get.js`


-----
Expand All @@ -96,14 +96,14 @@ __Usage:__

### Backups.list

View the [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/backups.list.js).
View the [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/api-reference-doc-snippets/backups.list.js).

[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/backups.list.js,samples/README.md)
[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/api-reference-doc-snippets/backups.list.js,samples/README.md)

__Usage:__


`node samples/backups.list.js`
`node samples/api-reference-doc-snippets/backups.list.js`


-----
Expand All @@ -113,14 +113,14 @@ __Usage:__

### Backups.restore

View the [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/backups.restore.js).
View the [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/api-reference-doc-snippets/backups.restore.js).

[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/backups.restore.js,samples/README.md)
[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/api-reference-doc-snippets/backups.restore.js,samples/README.md)

__Usage:__


`node samples/backups.restore.js`
`node samples/api-reference-doc-snippets/backups.restore.js`


-----
Expand All @@ -130,14 +130,14 @@ __Usage:__

### Backups.update

View the [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/backups.update.js).
View the [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/api-reference-doc-snippets/backups.update.js).

[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/backups.update.js,samples/README.md)
[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/api-reference-doc-snippets/backups.update.js,samples/README.md)

__Usage:__


`node samples/backups.update.js`
`node samples/api-reference-doc-snippets/backups.update.js`


-----
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

const snippets = {
create: (instanceId, appProfileId) => {
// [START bigtable_create_app_profile]
// [START bigtable_api_create_app_profile]
const {Bigtable} = require('@google-cloud/bigtable');
const bigtable = new Bigtable();
const instance = bigtable.instance(instanceId);
Expand All @@ -33,11 +33,11 @@ const snippets = {
.catch(err => {
// Handle the error.
});
// [END bigtable_create_app_profile]
// [END bigtable_api_create_app_profile]
},

delete: (instanceId, appProfileId) => {
// [START bigtable_delete_app_profile]
// [START bigtable_api_delete_app_profile]
const {Bigtable} = require('@google-cloud/bigtable');
const bigtable = new Bigtable();
const instance = bigtable.instance(instanceId);
Expand All @@ -51,11 +51,11 @@ const snippets = {
.catch(err => {
// Handle the error.
});
// [END bigtable_delete_app_profile]
// [END bigtable_api_delete_app_profile]
},

exists: (instanceId, appProfileId) => {
// [START bigtable_exists_app_profile]
// [START bigtable_api_exists_app_profile]
const {Bigtable} = require('@google-cloud/bigtable');
const bigtable = new Bigtable();
const instance = bigtable.instance(instanceId);
Expand All @@ -69,11 +69,11 @@ const snippets = {
.catch(err => {
// Handle the error.
});
// [END bigtable_exists_app_profile]
// [END bigtable_api_exists_app_profile]
},

get: (instanceId, appProfileId) => {
// [START bigtable_get_app_profile]
// [START bigtable_api_get_app_profile]
const {Bigtable} = require('@google-cloud/bigtable');
const bigtable = new Bigtable();
const instance = bigtable.instance(instanceId);
Expand All @@ -88,11 +88,11 @@ const snippets = {
.catch(err => {
// Handle the error.
});
// [END bigtable_get_app_profile]
// [END bigtable_api_get_app_profile]
},

getMeta: (instanceId, appProfileId) => {
// [START bigtable_app_profile_get_meta]
// [START bigtable_api_app_profile_get_meta]
const {Bigtable} = require('@google-cloud/bigtable');
const bigtable = new Bigtable();
const instance = bigtable.instance(instanceId);
Expand All @@ -107,11 +107,11 @@ const snippets = {
.catch(err => {
// Handle the error.
});
// [END bigtable_app_profile_get_meta]
// [END bigtable_api_app_profile_get_meta]
},

setMeta: (instanceId, appProfileId, clusterId) => {
// [START bigtable_app_profile_set_meta]
// [START bigtable_api_app_profile_set_meta]
const {Bigtable} = require('@google-cloud/bigtable');
const bigtable = new Bigtable();
const instance = bigtable.instance(instanceId);
Expand All @@ -132,7 +132,7 @@ const snippets = {
.catch(err => {
// Handle the error.
});
// [END bigtable_app_profile_set_meta]
// [END bigtable_api_app_profile_set_meta]
},
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ async function main(
clusterId = 'YOUR_CLUSTER_ID',
backupId = 'YOUR_BACKUP_ID'
) {
// [START bigtable_create_backup]
// [START bigtable_api_create_backup]
const {Bigtable} = require('@google-cloud/bigtable');
const bigtable = new Bigtable();

Expand Down Expand Up @@ -46,7 +46,7 @@ async function main(
}

await createBackup();
// [END bigtable_create_backup]
// [END bigtable_api_create_backup]
}

const args = process.argv.slice(2);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ async function main(
clusterId = 'YOUR_CLUSTER_ID',
backupId = 'YOUR_BACKUP_ID'
) {
// [START bigtable_delete_backup]
// [START bigtable_api_delete_backup]
const {Bigtable} = require('@google-cloud/bigtable');
const bigtable = new Bigtable();

Expand All @@ -40,7 +40,7 @@ async function main(
}

await deleteBackup();
// [END bigtable_delete_backup]
// [END bigtable_api_delete_backup]
}

const args = process.argv.slice(2);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ async function main(
clusterId = 'YOUR_CLUSTER_ID',
backupId = 'YOUR_BACKUP_ID'
) {
// [START bigtable_get_backup]
// [START bigtable_api_get_backup]
const {Bigtable} = require('@google-cloud/bigtable');
const bigtable = new Bigtable();

Expand Down Expand Up @@ -52,7 +52,7 @@ async function main(
}

await getBackup();
// [END bigtable_get_backup]
// [END bigtable_api_get_backup]
}

const args = process.argv.slice(2);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ async function main(
tableId = 'YOUR_TABLE_ID',
clusterId = 'YOUR_CLUSTER_ID'
) {
// [START bigtable_list_backups]
// [START bigtable_api_list_backups]
const {Bigtable} = require('@google-cloud/bigtable');
const bigtable = new Bigtable();

Expand All @@ -44,7 +44,7 @@ async function main(
}

await listBackups();
// [END bigtable_list_backups]
// [END bigtable_api_list_backups]
}

const args = process.argv.slice(2);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ async function main(
tableId = 'YOUR_TABLE_ID',
backupId = 'YOUR_BACKUP_ID'
) {
// [START bigtable_restore_backups]
// [START bigtable_api_restore_backup]
const {Bigtable} = require('@google-cloud/bigtable');
const bigtable = new Bigtable();

Expand All @@ -41,7 +41,7 @@ async function main(
}

await restoreBackup();
// [END bigtable_restore_backup]
// [END bigtable_api_restore_backup]
}

const args = process.argv.slice(2);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ async function main(
clusterId = 'YOUR_CLUSTER_ID',
backupId = 'YOUR_BACKUP_ID'
) {
// [START bigtable_update_backup]
// [START bigtable_api_update_backup]
const {Bigtable} = require('@google-cloud/bigtable');
const bigtable = new Bigtable();

Expand All @@ -43,7 +43,7 @@ async function main(
}

await updateBackup();
// [END bigtable_update_backup]
// [END bigtable_api_update_backup]
}

const args = process.argv.slice(2);
Expand Down
Loading

0 comments on commit 5d3e8f7

Please sign in to comment.