Skip to content

Commit

Permalink
Upgrade repo-tools and regenerate scaffolding. (#14)
Browse files Browse the repository at this point in the history
* Upgrade repo-tools and regenerate scaffolding.

* make lint work in circleci
  • Loading branch information
jmdobry authored and alexander-fenster committed Mar 16, 2018
1 parent a715c70 commit 7832fe2
Show file tree
Hide file tree
Showing 9 changed files with 14,133 additions and 17 deletions.
9 changes: 9 additions & 0 deletions packages/google-cloud-oslogin/.circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,15 @@ jobs:
npm link
environment:
NPM_CONFIG_PREFIX: /home/node/.npm-global
- run:
name: Link the module being tested to the samples.
command: |
cd samples/
npm link ../
npm install
cd ..
environment:
NPM_CONFIG_PREFIX: /home/node/.npm-global
- run:
name: Run linting.
command: npm run lint
Expand Down
8 changes: 1 addition & 7 deletions packages/google-cloud-oslogin/.cloud-repo-tools.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
{
"_product": "oslogin",
"id": "oslogin",
"name": "Google Cloud OS Login API",
"short_name": "OS Login",
"docs_url": "https://cloud.google.com/compute/docs/oslogin/rest/",
"description": "Manages OS login configuration for Directory API users.",
"api_id": "oslogin.googleapis.com",
"product": "oslogin",
"requiresKeyFile": true,
"requiresProjectId": true,
"client_reference_url": "https://cloud.google.com/nodejs/docs/reference/oslogin/latest/",
Expand Down
5 changes: 4 additions & 1 deletion packages/google-cloud-oslogin/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
.nyc_output
docs/
out/
build/
system-test/secrets.js
system-test/*key.json
*.lock
*-lock.js*
.DS_Store
google-cloud-logging-winston-*.tgz
google-cloud-logging-bunyan-*.tgz
4 changes: 4 additions & 0 deletions packages/google-cloud-oslogin/CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@
# name <email>
#
Alexander Fenster <fenster@google.com>
Alexander Fenster <github@fenster.name>
Dave Gramlich <callmehiphop@gmail.com>
Stephen <stephenplusplus@users.noreply.github.com>
greenkeeper[bot] <greenkeeper[bot]@users.noreply.github.com>
47 changes: 40 additions & 7 deletions packages/google-cloud-oslogin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
[![AppVeyor](https://ci.appveyor.com/api/projects/status/github/googleapis/nodejs-os-login?branch=master&svg=true)](https://ci.appveyor.com/project/googleapis/nodejs-os-login)
[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-os-login/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-os-login)

> Node.js idiomatic client for [OS Login][product-docs].
> Node.js idiomatic client for [Cloud OS Login API][product-docs].
Manages OS login configuration for Directory API users.
The [Google Cloud OS Login API](https://cloud.google.com/compute/docs/oslogin/rest) manages OS login configuration for Google account users.


* [OS Login Node.js Client API Reference][client-docs]
* [Cloud OS Login API Node.js Client API Reference][client-docs]
* [github.com/googleapis/nodejs-os-login](https://github.com/googleapis/nodejs-os-login)
* [OS Login Documentation][product-docs]
* [Cloud OS Login API Documentation][product-docs]

Read more about the client libraries for Cloud APIs, including the older
Google APIs Client Libraries, in [Client Libraries Explained][explained].
Expand Down Expand Up @@ -59,9 +59,42 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained].

npm install --save @google-cloud/os-login

### Using the client library

```javascript
if (
!process.env.GCLOUD_PROJECT ||
!process.env.GOOGLE_APPLICATION_CREDENTIALS
) {
throw new Error(
'Usage: GCLOUD_PROJECT=<project_id> GOOGLE_APPLICATION_CREDENTIALS=<path to key json file> node #{$0}'
);
}

The [OS Login Node.js Client API Reference][client-docs] documentation
const oslogin = require('@google-cloud/oslogin');

const projectId = process.env.GCLOUD_PROJECT;

const client = new oslogin.OsLoginServiceClient({
projectId: projectId
});

const request = {
name: 'users/1234abcd'
};

client.getLoginProfile(request)
.then(responses => {
const loginProfile = responses[0];
console.log(loginProfile);
})
.catch(err => {
console.error('ERROR:', err);
});
```


The [Cloud OS Login API Node.js Client API Reference][client-docs] documentation
also contains samples.

## Versioning
Expand All @@ -87,5 +120,5 @@ Apache Version 2.0
See [LICENSE](https://github.com/googleapis/nodejs-os-login/blob/master/LICENSE)

[client-docs]: https://cloud.google.com/nodejs/docs/reference/oslogin/latest/
[product-docs]: https://cloud.google.com/compute/docs/oslogin/rest/
[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png
[product-docs]: https://cloud.google.com/compute/docs/oslogin/rest
[shell_img]: //gstatic.com/cloudssh/images/open-btn.png
Loading

0 comments on commit 7832fe2

Please sign in to comment.