Skip to content

Commit

Permalink
feat: initial stub of library (#3)
Browse files Browse the repository at this point in the history
* feat: add samples

* feat!: initial stub of library
  • Loading branch information
sofisl authored Jan 6, 2021
1 parent 82a781d commit 17b97e6
Show file tree
Hide file tree
Showing 13 changed files with 565 additions and 54 deletions.
47 changes: 43 additions & 4 deletions packages/google-cloud-managedidentities/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# [Managed Service for Microsoft Active Directory: Node.js Client](https://github.com/googleapis/nodejs-managed-identities)

[![release level](https://img.shields.io/badge/release%20level-general%20availability%20%28GA%29-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages)
[![npm version](https://img.shields.io/npm/v/managedidentities.svg)](https://www.npmjs.org/package/managedidentities)
[![npm version](https://img.shields.io/npm/v/@google-cloud/managed-identities.svg)](https://www.npmjs.org/package/@google-cloud/managed-identities)
[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-managed-identities/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-managed-identities)


Expand All @@ -32,8 +32,8 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained].
* [Quickstart](#quickstart)
* [Before you begin](#before-you-begin)
* [Installing the client library](#installing-the-client-library)


* [Using the client library](#using-the-client-library)
* [Samples](#samples)
* [Versioning](#versioning)
* [Contributing](#contributing)
* [License](#license)
Expand All @@ -51,11 +51,50 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained].
### Installing the client library

```bash
npm install managedidentities
npm install @google-cloud/managed-identities
```


### Using the client library

```javascript
// Imports the Google Cloud client library

// remove this line after package is released
// eslint-disable-next-line node/no-missing-require
const {
ManagedIdentitiesServiceClient,
} = require('@google-cloud/managed-identities');

// TODO(developer): replace with your prefered project ID.
// const projectId = 'my-project'

// Creates a client
// eslint-disable-next-line no-unused-vars
const client = new ManagedIdentitiesServiceClient();

//TODO(library generator): write the actual function you will be testing
async function listDomains() {
const domains = await client.listDomains({
parent: `projects/${projectId}/locations/global`,
});
console.info(domains);
}
listDomains();

```



## Samples

Samples are in the [`samples/`](https://github.com/googleapis/nodejs-managed-identities/tree/master/samples) directory. The samples' `README.md`
has instructions for running the samples.

| Sample | Source Code | Try it |
| --------------------------- | --------------------------------- | ------ |
| Quickstart | [source code](https://github.com/googleapis/nodejs-managed-identities/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-managed-identities&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) |



The [Managed Service for Microsoft Active Directory Node.js Client API Reference][client-docs] documentation
Expand Down
11 changes: 1 addition & 10 deletions packages/google-cloud-managedidentities/linkinator.config.json
Original file line number Diff line number Diff line change
@@ -1,10 +1 @@
{
"recurse": true,
"skip": [
"https://codecov.io/gh/googleapis/",
"www.googleapis.com",
"img.shields.io"
],
"silent": true,
"concurrency": 10
}
{"recurse":true,"skip":["https://googleapis.dev/nodejs/managedidentities/latest/","https://github.com/googleapis/nodejs-managed-identities/blob/master/CHANGELOG.md","https://github.com/googleapis/nodejs-managed-identities/tree/master/samples","https://github.com/googleapis/nodejs-managed-identities/blob/master/samples/quickstart.js","http://localhost:5542/","https://codecov.io/gh/googleapis/","www.googleapis.com","img.shields.io"],"silent":true,"concurrency":10}
18 changes: 10 additions & 8 deletions packages/google-cloud-managedidentities/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "managedidentities",
"name": "@google-cloud/managed-identities",
"version": "0.1.0",
"description": "Managedidentities client for Node.js",
"repository": "googleapis/nodejs-managedidentities",
"repository": "googleapis/nodejs-managed-identities",
"license": "Apache-2.0",
"author": "Google LLC",
"main": "build/src/index.js",
Expand Down Expand Up @@ -34,28 +34,30 @@
"lint": "gts check",
"prepare": "npm run compile-protos && npm run compile",
"system-test": "c8 mocha build/system-test",
"test": "c8 mocha build/test"
"test": "c8 mocha build/test",
"samples-test": "cd samples/ && npm link ../ && npm test",
"prelint": "cd samples; npm link ../; npm i"
},
"dependencies": {
"google-gax": "^2.9.2"
},
"devDependencies": {
"@types/mocha": "^8.0.4",
"@types/node": "^14.14.8",
"@types/sinon": "^9.0.8",
"@types/node": "^14.14.10",
"@types/sinon": "^9.0.9",
"c8": "^7.3.5",
"gts": "^3.0.2",
"jsdoc": "^3.6.6",
"jsdoc-fresh": "^1.0.2",
"jsdoc-region-tag": "^1.0.6",
"linkinator": "^2.2.2",
"linkinator": "^2.5.1",
"mocha": "^8.2.1",
"null-loader": "^4.0.1",
"pack-n-play": "^1.0.0-2",
"sinon": "^9.2.1",
"ts-loader": "^8.0.11",
"typescript": "^4.0.5",
"webpack": "^5.5.1",
"typescript": "^4.1.2",
"webpack": "^5.9.0",
"webpack-cli": "^4.2.0"
},
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion packages/google-cloud-managedidentities/protos/protos.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 17b97e6

Please sign in to comment.